Mahgoub graduated from engineering school in 1929 and in 1938 he obtained Business Level in law from the Gordon Memorial College. He was elected to the Parliament in 1946. Mahgoub was foreign minister between 1956 and 1958, and then again between 1964 and 1965.
He was elected Prime Minister in 1965, but subsequently forced to resign.
He was elected Prime Minister for the second time in 1967 and served in that position until 1969. He was the first sudanese to say a word in the white house.