In 1852 Adam's fellowship at St John's College ended so he effectively became unemployed although he continued his research. However in February 1853 he was elected to a fellowship at Pembroke College, Cambridge, and resumed teaching. He was to hold this Fellowship, in addition to other posts, until his death. Adams became Regius Professor of Mathematics at St Andrews in October 1857. It was a short tenure of the chair for, in March 1859, he succeeded Peacock as Lowndean Professor of Astronomy and Geometry at Cambridge and held the post for over 32 years. He became director of the Cambridge Observatory in 1861 but negotiated rather unusual conditions for his appointment. The Observatory was poorly funded and Challis had tried hard to obtain support for it. Eventually, in December 1858, Challis arranged with Anne Sheepshanks that she make a donation in memory of her brother. Challis and Stokes approached Adams to take on the directorship in place of Challis who wished to leave the post. Adams was interested in theoretical work, not in observing, so he made conditions that he would not have to observe or process data. He could resign the position if he found that the work in any way interfered with his research. All this was possible since the Sheepshanks donation enabled a senior assistant to be employed to undertake observational work.