"The reason of his refusal was not (says his biographer) as some have imagined, his having taken the solemn league and covenant; for that he never did, and often declared that he ever thought it an unlawful oath: but he said he could not say, for those that had taken the oath, that no obligation lay upon them, but feared there might."
Ray published about 23 works, depending on how they are counted. The biological works were usually in Latin, the rest in English. His first publication, while at Cambridge, was the Catalogus plantarum circa Cantabrigiam nascentium (1660), followed by many works, botanical, zoological, theological and literary.
At Cambridge, Ray spent much of his time in the study of natural history, a subject which would occupy him for most of his life. When Ray found himself unable to subscribe as required by the ‘Bartholomew Act’ of 1662 he, along with 13 other college fellows, resigned his fellowship on 24 August 1662 rather than swear to the declaration that the Solemn League and Covenant was not binding on those who had taken it. Tobias Smollett quoted the reasoning given in the biography of Ray by william Derham:
In the spring of 1663 Ray started together with Willughby and two other pupils (Philip Skippon and Nathaniel Bacon) on a tour through Europe, from which he returned in March 1666, parting from Willughby at Montpellier, whence the latter continued his journey into Spain. He had previously in three different journeys (1658, 1661, 1662) travelled through the greater part of Great Britain, and selections from his private notes of these journeys were edited by George Scott in 1760, under the title of Mr Ray's Itineraries. Ray himself published an account of his foreign travel in 1673, entitled Observations topographical, moral, and physiological, made on a Journey through part of the Low Countries, Germany, Italy, and France. From this tour Ray and Willughby returned laden with collections, on which they meant to base complete systematic descriptions of the animal and vegetable kingdoms. Willughby undertook the former part, but, dying in 1672, left only an ornithology and ichthyology for Ray to edit; while Ray used the botanical collections for the groundwork of his Methodus plantarum nova (1682), and his great Historia generalis plantarum (3 vols., 1686, 1688, 1704). The plants gathered on his British tours had already been described in his Catalogus plantarum Angliae (1670), which formed the basis for later English floras.
In 1667 Ray was elected Fellow of the Royal Society, and in 1669 he and Willughby published a paper on Experiments concerning the Motion of Sap in Trees. In 1671, he presented the research of Francis Jessop on formic acid to the Royal Society.
As outlined in his Historia Plantarum (1685–1703):
Ray was the first person to produce a biological definition of species, in his 1686 History of plants:
In the 1690s, he published three volumes on religion—the most popular being The Wisdom of God Manifested in the Works of the Creation (1691), an essay describing evidence that all in nature and space is God's creation as in Bible is affirmed. In this volume, he moved on from the naming and cataloguing of species like his successor Carl Linnaeus. Instead, Ray considered species' lives and how nature worked as a whole, giving facts that are arguments for God's will expressed in His creation of all 'visible and invisible' (Colossians 1:16). Ray gave an early description of dendrochronology, explaining for the ash tree how to find its age from its tree-rings.
The Ray Society, named after John Ray, was founded in 1844. It is a scientific text publication society and registered charity, based at the Natural History Museum, London, which exists to publish books on natural history, with particular (but not exclusive) reference to the flora and fauna of the British Isles. As of 2017, the Society had published 179 volumes.
In 1986, to mark the 300th anniversary of the publication of Ray's Historia Plantarum, there was a celebration of Ray's legacy in Braintree, Essex. A "John Ray Gallery" was opened in the Braintree Museum.
The John Ray Initiative (JRI) is an educational charity that seeks to reconcile scientific and Christian understandings of the environment. It was formed in 1997 in response to the global environmental crisis and the challenges of sustainable development and environmental stewardship. John Ray's writings proclaimed God as creator whose wisdom is "manifest in the works of creation", and as redeemer of all things. JRI aims to teach appreciation of nature, increase awareness of the state of the global environment, and to promote a Christian understanding of environmental issues.