McIvor was born in Dollar in Scotland where his father John had settled after working to establish a nursery garden at Crieff.
McIvor trained in horticulture and arboriculture and worked at Kew before taking up in 1848, a position in southern India as superintendent of the yet to be established Ootacamund botanical garden.
At Kew, McIvor took an interest in bryophytes and published an exsiccata of British hepatics under the title Hepaticae Britannicae, or, pocket herbarium of British Hepaticae, named and arranged according to the most improved system, by William Graham McIvor, Royal Gardens, Kew in 1847.
[2][3] McIvor received cinchona plants in 1861 that had been brought from South America by Clements Markham.
He also faced labour shortages which were for a while solved by importing Chinese convicts from the Straits Settlements.