For the second edition of Principia Newton wrote an essay known as the General Scholium. There is an English translation of the expanded version from the third edition.
In this essay he hints at his theological views which during his lifetime were only shared in private. A few were published after his death, but the vast majority of Newton’s papers on all subjects except physics became available for scholarly study only in the middle of the 20th century, more than 200 years after his death.
His discussion of the meaning of the word “god” is considered a subtle dig at Trinitarianism. He argues that “god” is a title, not an intrinsic attribute of any person. A God exists when a superhuman being has a dominion. When he does not make explicit is his subordinationist christology: that Jesus, though “God”, is God only in the relative sense that he is a superhuman being and rules over a domain. But in Newton’s view this does not make him the Supreme Being or True God of monotheism because his domain is delegated to him. (He did make this understanding explicit in his unpublished writings.)
He goes on to argue that there is a supreme God who exists by necessity and has always existed. He sees the supreme God as a non corporal being without a body or physical location. If this concept is impossible to understand, it is only because it is totally alien to human experience.
He then takes a swipe at Materialism: “Blind metaphysical necessity, which is certainly the same always and ever where, could produce no variety of things. All the diversity of natural things which we find, suited to different times and places, could arise from nothing but the ideas and will of a Being necessarily existing.” He concludes his discussion of God by saying that science can tell us of the nature of God.
Judeao-Christian thinking had long held that the natural world was law-based. Newton saw his discoveries as vindication of that view. In a famous letter he wrote:
When I wrote my treatise about our system, I had an eye upon such principles as might work with considering men, for the belief of a Deity, and nothing can rejoice me more than to find it useful for that purpose.
Newton saw natural law as sufficient to explain how the world works now, but believed that the world is ultimately artificial, the producted of mental processes. But later thinkers saw this as a lack of imagination and in the second half of the 19th century came to see science as exclusively a search for material causes.