When John James Audubon arrived in Liverpool in July 1826 Traill helped him to find a publisher for his The Birds of America. Audubon named the Traill's flycatcher after him, which at one time referred to a species which included both the willow flycatcher (Empidonax traillii) and the alder flycatcher (Empidonax alnorum).
Edinburgh University and the Encyclopædia Britannica
Traill returned to Edinburgh University in 1832 as a professor of medical jurisprudence and served in this role until death, also serving as President of the Royal College of Physicians in Edinburgh 1852 to 1854. He edited the 8th edition of the Encyclopædia Britannica (1852–61), which concluded a year before his death.
He died in Edinburgh on 30 July 1862, and was interred at St Cuthbert's cemetery. The grave contains members of both the Omond family and Traill family and stands against an outer eastern wall of the southern section.