John Couch Adams entered St John's in 1839. At the end of his second year he decided to investigate the irregularities in the motion of Uranus in order to discover if they were due to the action of an unknown planet beyond it. Having graduated senior wrangler in 1843, and won a fellowship, Adams took up the problem in earnest. By October 1843, aged just 24, Adams had arrived at a solution of the inverse perturbation problem and although his first result was approximate, it convinced him that the disturbances of Uranus were due to an undiscovered planet. In late 1845 Adams presented his calculations for the elliptic elements, mass, and heliocentric longitude of the hypothetical planet to James Challis, Director of the Cambridge Observatory, and George Biddell Airy, Astronomer Royal. In the meantime the French astronomer Urbain Jean Joseph Le Verrier had independently published several papers on Uranus and reached the same conclusions as Adams regarding an exterior planet. It was as a result of Le Verrier's efforts that Johann Gottfried Galle, of the Berlin Observatory, discovered Neptune on 23 September 1846, less than one degree distant from where Le Verrier had predicted it would lie. While Le Verrier was showered with honours, Adams's earlier prediction, which agreed closely with Le Verrier's, remained unpublished. First publicised in a letter from Sir John Herschel to the London Athenaeum in October 1846 it provoked a long and bitter controversy over priority of discovery and the issue became a public sensation. Adams was offered a knighthood by Queen Victoria in 1847 but declined. In 1848 the Adams Prize was founded at Cambridge and the Royal Society awarded him its highest award, the Copley Medal. Adams's other astronomical achievements include work on the Moon's orbit and the Leonid meteors. During his time at Cambridge he spent 33 years as Lowndean Professor of Astronomy and Geometry and served as Director of the Cambridge Observatory. He left St John's to become a Fellow of Pembroke College in 1853.
Under the terms of his will Adams bequeathed most of his early printed books to Cambridge University Library, his astronomical books to the Cambridge Observatory, and what remained to the libraries of Pembroke and St John's. Some two hundred items in the Old Library bear Adams's provenance. Many of these are 18th and 19th-century, including volumes of chap-books, plays and works by Joseph Priestley and William Cobbett, but there are some older volumes as well, including 16th-century editions of classical texts on mathematics, and an illustrated herbal (1578).
All the books which Adams bequeathed have a bookplate bearing his portrait.