In 1898, he was invited by Benjamin Baker to go to Egypt as assistant engineer to Maurice Fitzmaurice, the resident engineer in charge of constructing the first Aswan Dam. MacDonald's appointment as an assistant engineer during the building of this significant structure marked the beginning of a 23-year term of service in Egypt. During the same dam's first heightening between 1908 and 1912, MacDonald was director-general of irrigation for the Egyptian Government. He subsequently became Under Secretary of State for Public Works, and finally adviser to Egypt's Minister of Public Works.