McGavin attended Daniel Stewart's College, a private school in Edinburgh,[7] then studied Zoology at the University of Edinburgh from 1971 to 1975, followed by a PhD in entomology at Imperial College, London.[6] He went on to teach and research at the University of Oxford.[8] He is Honorary Research Associate at Oxford University Museum of Natural History[3][4] and the Department of Zoology of Oxford University, where he lists his interests as "Terrestrial arthropods especially in tropical forests, caves and savannah. Public understanding of science. Exploration."[9] He is also a visiting professor of entomology at the University of Derby.[6]
McGavin is a Fellow of the Linnean Society and of the Royal Geographical Society, and has several insect species named in his honour.[3][10][11] He was previously Assistant Curator of Entomology at Oxford University's Museum of Natural History.[12][13]
McGavin has lectured at the Cheltenham Science Festival,[13] given the Royal Geographical Society children's Christmas lecture and contributes to their Schools Programme. He won Earthwatch's "Irreplaceable – The World's Most Invaluable Species" debate, broadcast on BBC Radio 4, in 2008[14] and he is a lecturer on board Cunard ships.[15] In 2017 he gave the Royal Entomological Society's Verrall Lecture speaking on 'Tales from television: an entomologist's perspective'[16]
His other TV appearances include What's up Doc? (STV), Tomorrow's World (BBC), Package Holiday Undercover (ITV), Facing the Music (BBC), Take One Museum (Channel 4) and various national and local news programmes.
His programme Afterlife: The Science of Decay was screened by the BBC on 6 December 2011.[22][23]
From July 2011, another BBC programme, The Dark, about the nocturnal activities of animals, was produced.[24] This started transmission on BBC2 on 29 July 2012 and on BBC HD a day later. In October 2012, he appeared, with co-presenter Dr Alice Roberts in the BBC series Prehistoric Autopsy.[25] In 2013 he presented Planet Ant: Life Inside the Colony. In 2014, he presented Monkey Planet and a two-part series on BBC Four: Dissected: The Incredible Human Hand and Dissected: The Incredible Human Foot.[26]
In October 2017, McGavin presented a one-off BBC documentary Oak Tree: Nature's Greatest Survivor.[27]
In 2018 McGavin and Zoe Laughlin made a BBC Four documentary The Secret Life of Landfill: A Rubbish History, exploring the fate and future of rubbish deposited in landfill sites.[28][29] He also presented Nature's Turtle Nursery: Secrets from Inside the Nest.[30]
In 2020, McGavin and Helen Czerski presented a 90-minute BBC Four documentary called Ocean Autopsy: The Secret Story of Our Seas which concerned the changes both in North Sea and in the world's oceans.[31]
In 2024, McGavin made a guest appearance in the promotion leading up to the release of Helldivers 2, playing a scientist in a comedic advertisement for the game.[32]