William MacGillivray (25 January 1796 – 4 September 1852) was a Scottish naturalist and ornithologist.
MacGillivray was born in Old Aberdeen and brought up on the island of Harris. He returned to Aberdeen where he attended King's College, graduating MA in 1815. He studied medicine, but did not complete the course. In 1823 he became assistant to Robert Jameson, the Regius Professor of Natural History at the University of Edinburgh. He was curator of the museum of the Royal College of Surgeons of Edinburgh from 1831, resigning in 1841 to become Professor of Natural History at Marischal College, Aberdeen. He died in Aberdeen and was buried in Edinburgh's New Calton cemetery.
MacGillivray was a friend of American bird expert John James Audubon, and wrote a large part of Audubon's Ornithological Biographies from 1830-1839. Audubon named MacGillivray's Warbler for him.
MacGillivray's eldest son, John MacGillivray (1822-1867), published an account of the voyage round the world of HMS Rattlesnake, on board of which he was naturalist. Another son, Paul, published an Aberdeen Flora in 1853. He donated 214 of his father's paintings to the Natural History Museum.