James Madison, like John Adams, Thomas Jefferson, Ben Franklin and probably George Washington and other of America's key Founders, was a theological unitarian. Though Madison studied under the Calvinist minister John Witherspoon at Princeton, Madison never credited Witherspoon as a religious influence. And the sometimes repeated notion that Witherspoon turned Madison into a Calvinist is otherwise without merit. Witherspoon himself flirted with rationalism and chiefly taught his Princeton students, in his political lectures, rationalism and naturalism, not Calvinist orthodoxy.
Witherspoon also introduced his Princeton students to teachings of the philosophical rationalist and Anglican Divine, Samuel Clarke. And that, not Witherspoon, is who Madison explicitly credited as a spiritual influence. In his letter to F. Beasley, when asked to explicate his theological creed, Madison does not respond with scripture or orthodox Christian doctrine but rather philosophical rationalism and an appeal to Clarke for authority.
I have duly recd the copy of your little tract on the proofs of the Being & Attributes of God. To do full justice to it, would require not only a more critical attention than I have been able to bestow on it, but a resort to the celebrated work of Dr. Clarke, which I read fifty years ago only....
The reasoning that could satisfy such a mind as that of Clarke, ought certainly not to be slighted in the discussion.
Samuel Clarke was an Arian heretic who was nearly defrocked from his position in the Anglican Church for peddling Arianism, a form of unitarianism which taught Jesus to be a divine but created and subordinate being to God the Father, like a super-angel. As the Stanford Encyclopedia of Philosophy notes:
In 1712, apparently against the advice of some of Queen Anne's ministers, Clarke published The Scripture Doctrine of the Trinity, which was accused of Arianism, the view that Christ is divine but created. The ensuing controversy culminated two years later in his humiliating promise to the Upper House of Convocation not to preach or write on the topic any longer. However, this act of submission did not silence the correct rumors that he, like Newton himself, was still an Arian. How much these suspicions of heterodoxy damaged his ecclesiastical career is unclear. However, Voltaire reports that Bishop Gibson effectively prevented Clarke's elevation to the see of Canterbury by pointing out that Clarke was indeed the most learned and honest man in the kingdom, but had one defect: he was not a Christian.
In any event, the following is additional testimony of Madison's unitarianism from George Ticknor a prominent New England Unitarian:
I found the President more free and open than I expected, starting subjects of conversation and making remarks that sometimes savored of humor and levity. He sometimes laughed, and I was glad to hear it ; but his face was always grave. He talked of religious sects and parties, and was curious to know how the cause of liberal Christianity stood with us, and if the Athanasian creed was well received by our Episcopalians. He pretty distinctly intimated to me his own regard for the Unitarian doctrines.— TICKNOR, GEORGE, 1815, Letter to his Father, Jan. 21 ; Life, Letters and Journals, vol. I, p. 30.