With the return of peace, Madison sought out policies that would allow the nation to fulfill its potential. He gave top civilian and military appointments to able and proven colleagues—Monroe, Gallatin, John Quincy Adams, Commodores John Rodgers and David Porter, and Generals Jackson and Winfield Scott, for example—in whom the whole nation took pride. He also provided leadership to Congress in his annual message of December 1815, recommending a rechartered Bank of the United States, an equitable commercial treaty with Great Britain, a mildly protective tariff, a small but high-quality defense establishment, a national university, and a program of internal improvements authorized by a constitutional amendment.
This broad, national program was for Madison a propitious return to the high hopes he had shared with Jefferson and Gallatin in 1801–1804, before the ten-year hiatus forced on the nation by the traumatic, nearly overwhelming effects of the Napoleonic Wars. With the Hamiltonian engine in part restrained or dismantled and the nation's republican institutions validated and strengthened by their wartime testing, it was possible to use them for the public interest, and it was the responsibility of the president to articulate that interest. Although it was the task of Congress to legislate, the need for both practical and symbolic leadership was still crucial. Madison thus furnished steady, principled guidance during two years of national euphoria.
Viewed in this light, Henry Adams' often repeated criticism that Madison found himself forced to become a federalist in order to govern properly becomes a half-truth. He was, as Jefferson had claimed for himself, a federalist in that he saw virtue in active national leadership and other federalist principles, but Madison neither abandoned republican precepts nor sought to embrace federalism in its partisan guise. Rather, he intended to eliminate party itself from public life. It was not only safe but essential in 1815 to provide presidential leadership, within widely acknowledged republican guidelines, for the nation as a whole; and in order to do this, the president would have, as much as possible, to rise above partisanship.
Madison (and the other pre-Jackson presidents), rather than supposing it was necessary for the chief executive, even in the White House, to be a vigorous, unabashed party leader, accepted the view that good leadership had to be nonpartisan. Madison knew, of course, that no human being can entirely transcend a partial view, but he would also have insisted that, especially in executive office, it is important to deemphasize party and faction and neutralize them as much as possible, as he had argued in The Federalist (paper no. 10). He further recognized there that special-interest, pluralist politics were "sown in the nature of man" and were "nourished" by the very air of free government. But Madison also believed that the serious intention and the obvious stance of the president to subordinate party (partial) interests and needs, if consistently kept in mind and in public view, would make a difference both in how he acted and in how the nation responded to him. Such an intention and such a stance, moreover, were especially important in a republic because they might influence public perceptions of the presidency and thus affect the range and character of leadership possible in the nation.
Madison's realism about the irrepressible causes of faction led him, in framing the Constitution, to guard against their influence and against any concentration of power that would allow greed and ambition to be dangerous to liberty. But he also regarded virtuous (that is, nonpartisan) leadership as vital to the public good, and he was willing, indeed determined, to encourage such leadership even if it meant putting some restraint on direct, popular government. In so acting, moreover, Madison believed not that he showed hostility to self-government but rather that he was being a wise and creative democrat. As his collaborator Jefferson said so clearly and so often, the true test of a republic was whether or not it cultivated talent and virtue. Neither he nor Madison, furthermore, ever doubted that wise leadership, above party, could provide critical assistance in meeting that test. Such, at any rate, was the aspiration, the republican commitment, and the conception of the presidency that guided Madison as he first devised and later filled the office that for two centuries has focused the hopes as well as the forebodings of the American people.
In retirement at Montpelier, his plantation in Orange County, Virginia, Madison and his vivacious, supremely sociable wife, Dolley, enjoyed twenty years of happy visiting with family, old friends, and semiofficial guests (most notably, the Marquis de Lafayette in 1824) who wanted to see and talk with the sage soon to be known as the Father of the Constitution. Madison remained active politically both as an adviser to public officials and as a participant in some especially favored activities. As long as Monroe was president, Madison wrote and conferred with him regularly, especially on the intricate and momentous settlements in foreign policy with Europe and Latin America that culminated in the Monroe Doctrine of 1823.
Letters exchanged and visits enjoyed with Gallatin, Richard Rush, John Quincy Adams, Henry Clay, and Martin Van Buren kept Madison in close touch with the nation's affairs well into the Jacksonian era. Most important, he took a leading role in combating the nullification movement, especially in denying, directly and authoritatively, that the Virginia Resolutions of 1798 had advocated that doctrine.
He continued a lifelong interest in scientific farming as president of the Agricultural Society of Albemarle, served for a time as president of the antislavery American Colonization Society, and attended the Virginia Constitutional Convention of 1829, where he sought both to diminish the power of Tide-water slaveholders and to extend the franchise. His most sustained public service, however, was to assist Jefferson in founding the University of Virginia and then to serve as its rector for eight years following Jefferson's death in 1826.
Although for ten years or so after his retirement Madison's health remained good enough to allow him to supervise his own farm daily and to make journeys to see many Virginia friends (including semiannual visits with Jefferson and Monroe near Charlottesville, twenty-five miles away), rheumatism and stomach disorders gradually confined him to Montpelier. There he spent most of his time arranging his voluminous papers and especially preparing his full and uniquely valuable notes on the debates of the Convention of 1787 for posthumous publication (published in three volumes in 1839, they became the leading source for understanding that signal event). In wide correspondence and frequent visits with dozens of historians and scholars, the learned, well-informed former president exerted a profound and judicious influence on the recording of the early history of the United States. In 1833 and 1834 his health failed seriously and he was confined to the fireside of his sitting room, where he died quietly on 28 June 1836, the last survivor of those who had played a leading role in the founding of the Republic.