MacDonald served his apprenticeship as an engineer with the former Highland Railway Company, and following its completion he spent some years as an assistant engineer on various railway construction projects in Northern Scotland. Among them, there was the building of the Black Isle line between 1890 and 1894, and the widening of the main line between Dalnaspidal and Blair Athol. Years later, MacDonald noted that his early railway work included the design and construction of a small earthen dam and hydroelectric plant.