From ages 11–16, Madison studied under Donald Robertson, an instructor at the Innes plantation in King and Queen County, Virginia. From Robertson, Madison learned math, geography, and modern and ancient languages. He became especially proficient in Latin.
At age 16, he began a two-year course of study under the Reverend Thomas Martin, who tutored Madison at Montpelier in preparation for college. Unlike most college-bound Virginians of his day, Madison did not choose William and Mary because the lowland climate of Williamsburg might have strained his delicate health. Instead, in 1769 he enrolled at the College of New Jersey (now Princeton University).
Through diligence and long hours of study that at times robbed him of his sleep, he managed to graduate in two years. His studies there included Latin, Greek, science, geography, math, rhetoric, and philosophy. Great emphasis also was placed on speech and debate. After graduation, Madison remained at Princeton to study Hebrew and philosophy under university president John Witherspoon before returning to Montpelier in the spring of 1772. Madison studied law sporadically but never gained admission to the bar.
. . . .
As a young lawyer, Madison defended Baptist preachers arrested for preaching without a license from the established Anglican Church. In addition, he worked with the preacher Elijah Craig on constitutional guarantees for religious liberty in Virginia.<8> Working on such cases helped form his ideas about religious freedom. Madison served in the Virginia state legislature (1776–79) and became known as a protégé of Thomas Jefferson. He attained prominence in Virginia politics, helping to draft the Virginia Statute for Religious Freedom. It disestablished the Church of England, and disclaimed any power of state compulsion in religious matters. He excluded Patrick Henry's plan to compel citizens to pay for a congregation of their own choice.
http://en.wikipedia.org/wiki/James_Madison