The Mexican War re-ignited sectional tensions between North and South over the expansion of slavery into territory acquired as a war indemnity from Mexico. In 1846 Congressman David Wilmot introduced a resolution that prohibited slavery in any territory acquired in the war. Though the resolution failed to pass in the Senate, it did pass in the House, demonstrating the reluctance of many northern representatives to accept the spread of slavery. Both major parties were roiled by the resulting sectional uneasiness. Whigs tried to avoid the question of slavery's expansion by arguing against any territorial indemnity. Democrats came up with the concept of popular sovereignty, whereby the citizens of a territory would decide whether to permit slavery.
The Democratic convention in May nominated Lewis Cass for president. Cass had opposed the Wilmot Proviso as a Michigan senator and was typically credited with the concept of popular sovereignty. The convention chose General William O. Butler as Cass's vice presidential running mate. Frustrated with the selection of Cass, who was an outspoken foe of the effort to exclude slavery from new territory, a significant portion of the Democratic party, the so-called Barnburner followers of Martin Van Buren, walked out of the convention. The Barnburners subsequently formed the Free Soil party with similarly disaffected Whigs and former members of the Liberty party. This third party met in Buffalo, New York, in August and selected Martin Van Buren as its presidential candidate and Charles Francis Adams, a Massachusetts Whig and son of the president, as its vice presidential candidate.
Whigs had hoped to frame the presidential campaign around the issue of prohibiting the acquisition of territory from Mexico. However, in March 1848, the Treaty of Guadalupe Hidalgo was submitted to the Senate, and its terms called for Mexico to cede substantial territory to the United States. Fearful that to reject the treaty would invite the Polk administration to carve up the entire Mexican nation, many Whigs senators voted to ratify. As a result, it was impossible to stage a presidential campaign on opposition to the acquisition of territory. Since issues had been abandoned, the Whigs decided to jettison Henry Clay, the man most closely identified with Whig principles, and instead selected Zachary Taylor, a former army general and hero of the Mexican War. Taylor was not identified with either party; as an army officer he had refrained from voting. Owner of a plantation in Louisiana complete with a slaves, he was the preferred candidate of southern Whigs. At the Whig national convention, Taylor's vote broke down along sectional lines, at least initially, and his selection was a harbinger of future sectional troubles for the Whig party.
Both major parties tried to obfuscate the contentious issue of slavery's expansion throughout the campaign. The Whigs did not adopt an election-year platform, while Democrats distributed regional campaign biographies of Cass, one for North and one for the South. Taylor's popularity was enough to push him into victory, as he polled 1,360,000 votes to Cass's 1,220,00 and Van Buren's 291,000. Still, the Free Soil party won 14.4 percent of votes in free states, demonstrating the potency in the North of the politics of restricting slavery.