Mohamed received his undergraduate degree in Computer Science and History at the University of the Witwatersrand in Johannesburg, South Africa, where he served as the Vice-President of the Student Union, and a masters degree in International Relations from the University of Cambridge.