While he lived in Oxford his house was a gathering-place for the leaders of thought at the university, and among his close friends were C. P. Eden, W. J. Copeland, C. Marriott, J. B. Morris, and James Bowling Mozley. At this time he turned his attention to the study of Arabic and Greek medical writers. His labours bore fruit in a Greek and Latin edition of the 'Physiology of Theophilus' (1842), a Latin edition of Sydenham's works for the Sydenham Society (1844) ; an English translation from the Arabic of Rhazes on the small-pox (1847), in addition to numerous articles in (Sir) William Smith's 'Dictionaries of Greek and Roman Antiquities and Biography' (1842-9).
In 1847 Greenhill worked enthusiastically to promote the election of W. E. Gladstone as member of parliament for the university (Burgon, Twelve Good Men, ii. 110). He remained a liberal in politics through life, but he abstained from supporting the party at the election of 1885, through fear of the threatened disestablishment of the church of England, and in 1886, when he disapproved of the home-rule proposals.
In 1851, mainly on account of his health, Greenhill left Oxford and settled at Hastings, taking the practice of James Mackness [q. v.] Here he became one of the physicians of the local infirmary, and took an active part in the work of various public charities. In 1855 he published 'Observations on the Death-rate of Hastings' in the first volume of the 'Journal of Public Health,' conducted by his friend, (Sir) Benjamin Ward Richardson [q. v. Suppl.] This subject he pursued in a paper on 'Hastings Parish Registers' in the 'Sussex Archaeological Collections,' vol. xiv. (1862). Greenhill's early investigations showed him how unhealthy were many of the dwellings of the labouring classes, and how injurious their condition was to the prosperity of the town, then rising into public favour as a health resort. With a view to remedying some part of the evil, he founded in 1857 the Hastings Cottage Improvement Society, which was worked as a company, and always paid a fair dividend. The society bought up, repaired, and improved, as far as possible, old and insanitary dwellings, besides building new houses upon approved modern principles. He was secretary from 1857 to 1891. So successful was this venture that, with some of the original shareholders, he started a similar organisation, the London Labourers' Dwellings Society, of which also he was secretary from 1862 to 1876. In 1881, on Gladstone's recommendation, he was granted a pension of 60l. on the civil list.
Greenhill devoted his spare time to the study of the writings of Sir Thomas Browne [q. v.] After several years of careful preparation he published his edition of 'Religio Medici,' 'Christian Morals,' and 'A Letter to a Friend,' in Macmillan's 'Golden Treasury' series in 1881. This was at once accepted as the standard edition of the book. It was characterised by scholarship and critical acumen, scrupulous accuracy, and loyalty to the author (Professor Saintsbury, in Sir H. Craik's English Prose Selections, ii. 313). He contributed an article on the bibliography of the 'Religio Medici' to the 'Bibliographer,' vol. i. No. 6, May 1882. For some time before his death he was engaged upon an edition of Sir Thomas Browne's 'Hydriotaphia' and 'Garden of Cyrus,' at which he was at work on the last evening of his life. It was left unfinished, and being completed by his friend, E. H. Marshall, was issued in the 'Golden Treasury' series in 1896.
Greenhill died at his residence in The Croft, Hastings, after a very short illness, from syncope, on 19 Sept. 1894. He was buried in the borough cemetery on 22 Sept., and a brass tablet has been placed to his memory in St. Clement's, his parish church. In 1840 he married Laura, daughter of John Ward, collector of H.M. customs at West Cowes, and niece of Dr. Arnold. By her, who died in 1882, he had three sons and two daughters, of whom a son and a daughter survive him.
Greenhill's principal works are : 1. 'The Physiology of Theophilus, in Greek and Latin,' London, 1842. 2. 'Prayers for the Medical Profession,' London, 1842. 3. 'Advice to a Medical Student,' London, 1843. 4. 'Advice to a Patient in a Hospital,' pts. i. and ii., London, 1843. 5. 'Sydenham's Works in Latin' (Sydenham Soc.), London, 1844. 6. 'Life of Sir James Stonhouse,' London, 1844. 7. 'Life of Thomas Harrison Burder, M.D.,' London, 1845. 8. 'Rhazes's Treatise on the Small-pox,' translated from the Arabic into English, London, 1847. 9. 'Άρτος έκ τού Ούρανύ: Bread from Heaven:' Scripture Texts for every day in the year, in Greek and English, 1872. 10. 'A Form of Prayer to be used on the opening of a new House, or Block of Buildings,' London, 1873. 11. 'A Classified List of the Charitable Institutions of Hastings and St. Leonards,' Hastings, 1873. 12. 'The Contrast: Duty and Pleasure, Right and Wrong,' Hastings,' 1874 ; 6th edit., London, 1893. 13. 'Sir Thomas Browne's Religio Medici, Letter to a Friend, &c., and Christian Morals,' London, 1881. 14. 'Sir Thomas Browne's Hydriotaphia and the Garden of Cyrus,'