Though some Whigs questioned whether Mexico had started an aggressive war, both houses of Congress declared war, with the House voting 174-to-14 to approve the declaration. One of the 14 dissenting votes was Adams, who believed that Polk was seeking to wage an offensive to expand slavery.[196] After the start of the war, he supported the Wilmot Proviso, an unsuccessful legislative proposal that would have banned slavery in any territory ceded by Mexico.[197] After 1846, ill health increasingly affected Adams, but he continued to oppose the Mexican–American War until his death in 1848.[198]

Anti-slavery movement
Main article: John Quincy Adams and abolitionism
BEP engraved portrait of Adams as president
In the 1830s, slavery emerged as an increasingly polarizing issue in the United States.[199] A longtime opponent of slavery, Adams used his new role in Congress to fight it, and he became the most prominent national leader opposing slavery.[200] After one of his reelection victories, he said that he must "bring about a day prophesied when slavery and war shall be banished from the face of the Earth". 