Answer:
In 1785, Madison had written one of the most significant essays regarding separation of religion and government (often referred to as the separation of church and state), which no doubt gave him inspiration for some of the Bill of Rights.
Madison envisioned a bill of rights that would have prevented both the federal government and the states from violating basic liberties. The Bill of Rights as ultimately ratified restricted only the federal government.