Alexander Herbert MacKenzie studied at the University of Aberdeen and at Magdalene College, University of Cambridge, and was awarded the degrees Bachelor of Arts (BA, 1890) with first class honours and Master of Arts (MA, 1894). He came to the Cape Colony in July 1895 to take up an appointment as professor of mathematics at Victoria College, Stellenbosch. When the college became the University of Stellenbosch in 1918 he continued in his post, until his retirement in April 1940, making him the staff member with the longest service at this institution. After his retirement he resided in Pretoria. In 1895 he married Mary G. Russell, with whom he had two sons and three daughters.
MacKenzie does not appear to have published much. In 1896 the University of the Cape of Good Hope admitted him to its MA degree on the basis of his masters degree from Aberdeen and Cambridge. Subsequently he served on the university's council from 1903 to 1918 and was an examiner in various branches of mathematics for its undergraduate, honours and masters students on a number of occasions during 1903-1916. In 1912 he represented the university at the first congress of universities of the British empire in London. He was an early member of the South African Association for the Advancement of Science for a few years.