Melville graduated M.D. at the University of Edinburgh, and became Demonstrator in Anatomy there. He then moved to the University of Oxford as assistant to Henry Wentworth Acland. He lectured to the Royal Zoological Society. At the 1847 British Association meeting Melville took part in the debate on Lepidosiren, judging it to be an amphibian. Acland did not find Melville easy to work with, and replaced him with Lionel Beale; Melville left Oxford in 1847. It was during this Oxford period that Hugh Edwin Strickland approached Melville about their joint book on the dodo. Melville began work on the anatomical aspects in 1847. The "Oxford head", from John Tradescant's dodo was dissected, as was the "London foot", and the remains of the "Oxford foot", most of what remained of the dodo specimen that had been exhibited in the 18th century. The book's publication provoked a search for fossil evidence of the dodo on Mauritius, to supplement the scanty specimens available. In April 1848 Melville was working with Gideon Mantell on Iguanadon and Hylaeosaurus. Later in the year they went together to visit the private collections of George Bax Holmes and William Devonshire Saull, as well as the British Museum, as Mantell pursued his intense quest to undermine the original dinosaur concept of 1842, as advocated by Richard Owen. Combative by nature, Melville was quite prepared to question the work of Owen on fossil reptiles: Owen's view was that the dodo was related to vultures, where Strickland and Melville associated it with pigeons and doves. Matters came to a head in May 1849, and then Mantell and Melville directly attacked Owen over Iguanadon. Strickland engaged Owen in controversy over the dodo in 1849–50, but by this time Melville had taken up his chair in Galway; Mantell died in 1852, and Strickland in 1853. Melville later collaborated successfully, for example with his Galway colleague William King. In 1854 he made a botanical tour in County Sligo with David Moore, who in the same year introduced Melville to Alexander Goodman More. Melville went on to help More with the Cybele Hibernica. Melville gave the 1858 series of Swiney lectures at the Museum of Practical Geology. Andrew Smith Melville the botanist was his son.