[36]
In 1812, Van Buren won his party's nomination for a seat in the New York State Senate. Though several Democratic-Republicans, including John Peter Van Ness, joined with the Federalists to oppose his candidacy, Van Buren won election to the state senate in mid-1812.[37] Later in the year, the United States entered the War of 1812 against Great Britain, while Clinton launched an unsuccessful bid to defeat President James Madison in the 1812 presidential election. After the election, Van Buren became suspicious that Clinton was working with the Federalist Party, and he broke from his former political ally.[38]
During the War of 1812, Van Buren worked with Clinton, Governor Tompkins, and Ambrose Spencer to support the Madison administration's prosecution of the war.[39] In addition, he was a special judge advocate appointed to serve as a prosecutor of William Hull during Hull's court-martial following the surrender of Detroit.[40][41] Anticipating another military campaign, he collaborated with Winfield Scott on ways to reorganize the New York Militia in the winter of 1814–1815, but the end of the war halted their work in early 1815.