The Whigs in 1846-47 had focused all their energies on condemning Polk's war policies. They had to reverse course quickly. In February 1848 Polk surprised everyone with the Treaty of Guadalupe Hidalgo that ended the Mexican-American War and gave the United States vast new territories (including what are now the states of California, Nevada, Utah, and parts of Wyoming, Colorado, Arizona, and New Mexico). The Whigs in the Senate voted 2-1 to approve the treaty. Then, in the summer, the Whigs nominated the hero of the war, Zachary Taylor.[3] While he did promise no more future wars, he did not condemn the Mexican-American War or criticize Polk, and the Whigs had to follow his lead. They shifted their attention to the new issue of whether slavery could be banned from the new territories.

The choice of Taylor was made almost out of desperation; he was not clearly committed to Whig principles, but he was popular for leading the war effort. The Democrats had a record of victory, peace, prosperity, and the acquisition of both Oregon and the Southwest. It appeared almost certain that they would win unless the Whigs picked Taylor. His victory made him one of only two Whigs to be elected president before the party ceased to exist in the 1850s; the other was William Henry Harrison, who had also been a general and war hero, but died a month after assuming office.

Mexican-American War General Zachary Taylor of Louisiana, an attractive candidate because of his successes on the battlefield, but who had never voted in an election himself, was openly courted by both the Democratic and Whig parties. Taylor ultimately declared himself a Whig, and easily took their nomination, receiving 171 delegate votes to defeat Henry Clay, Winfield Scott, Daniel Webster and others. After Webster turned down the vice-presidential candidacy, Millard Fillmore received the party's nomination for vice-president; defeating—among others—Abbott Lawrence, a Massachusetts politician whose mild opposition to slavery led him to be dubbed a "Cotton Whig".[4]

The Democrats chose a platform that remained silent on slavery, and with Cass suspected of pro-slavery leanings, many anti-slavery Democrats walked out of the Baltimore convention to begin the Free Soil Party. Van Buren had burned for the nomination, but he had wanted it on a Free Soil platform. Neither his name nor his stand received any support at the Democratic convention.

The Free Soil Party, was organized for the 1848 election to oppose further expansion of slavery into the western territories. Much of its support came from disaffected anti-slavery Democrats, including former President Martin Van Buren. The party was led by Salmon P. Chase and John Parker Hale and held its 1848 convention in Utica and Buffalo, New York. On June 22, Van Buren defeated Hale by a 154-129 delegate count to capture the Free Soil nomination, while Charles Francis Adams, the son and grandson of two other presidents, was chosen as the vice-presidential nominee.

Van Buren knew that the Free Soilers had not the slightest chance of winning, rather that his candidacy would split the Democratic vote and throw the election to the Whigs. Bitter and aging, Van Buren did not care despite the fact his life had been built upon the rock of party solidarity and party regularity. He loathed Lewis Cass and the principle of popular sovereignty with equal intensity.[5]

Despite their significant showing in the prior presidential election, certain events would conspire to remove the Liberty Party from political significance.

Initially, the nomination was to be decided in the fall of 1847 at a Convention in Buffalo, New York. There, Senator John P. Hale was nominated over Gerrit Smith, brother-in-law to the party's previous nominee James G. Birney. Leicester King, a former judge and state senator in Ohio, was nominated to be Hale's running mate. Anti-slavery Democrats and Whigs, disappointed with their respective nominees, would form a new movement in conjunction with members of the Liberty Party such as John Hale and Salmon Chase to form the Free Soil Party that summer. At this point, both Hale and King withdrew in favor of a Free Soil ticket lead by former President Martin Van Buren, and the great majority of members of the Liberty Party followed. A small faction refused to support Van Buren for the presidency, however. They held another convention in June 1848 as the "National Liberty Party." Gerrit Smith was nominated almost unanimously with Charles Foote, a religious minister from Michigan, as his running-mate.

The Native American Party, a precursor to the Know Nothings, met in September 1847 in Philadelphia, where they nominated Zachary Taylor for president and Henry A. S. Dearborn of Massachusetts for vice-president. Taylor would later be nominated for the presidency by the Whig Party the following year, rendering his previous nomination moot.

The campaign was fought without much enthusiasm, and practically without an issue. Neither of the two great parties made an effort to rally the people to the defense of any important principle.

Whig campaigners, which included Abraham Lincoln and Rutherford B. Hayes, talked up Taylor's "antiparty" opposition to the Jacksonian commitment to the spoils system and yellow-dog partisanship. In the South, they stressed that he was a Louisiana slaveholder, while in the North they highlighted his Whiggish willingness to defer to Congress on major issues (which he subsequently did not do).

Democrats repeated, as they had for many years, their opposition to a national bank, high tariffs, and federal subsidies for local improvements. The Free Soilers branded both major parties lackeys of the Slave Power, arguing that the rich planters controlled the agenda of both parties, leaving the ordinary white man out of the picture. They had to work around Van Buren's well-known reputation for compromising with slavery.

The Whigs had the advantage of highlighting Taylor's military glories. With Taylor remaining vague on the issues, the campaign was dominated by personalities and personal attacks, with the Democrats calling Taylor vulgar, uneducated, cruel and greedy, and the Whigs attacking Cass for graft and dishonesty. The division of the Democrats over slavery allowed Taylor to dominate the Northeast.[6]

The Free Soilers were on the ballots in only 17 of the 29 states with the popular vote, making it mathematically possible for Van Buren to win the presidency, but realistically his chances were nonexistent. Despite this, the party campaigned vigorously, particularly in the traditional Democrat strongholds in the northeast. While some Free Soilers were hopeful of taking enough states to throw the election into the House of Representatives, Van Buren himself knew this was a long shot, and that the best they could do was lay the groundwork for a hopefully improved showing in 1852.

Results by county explicitly indicating the percentage of the winning candidate in each county. Shades of yellow are for Taylor (Whig), shades of blue are for Cass (Democrat), and shades of green are for Van Buren (Free Soil).

"Cock of the walk" - Zachary Taylor as victor

With Taylor as their candidate, the Whigs won their second and last victory in a Presidential election. Taylor won the electoral college by capturing 163 of the 290 electoral votes. However, the popular vote was close. Although Taylor out-polled Cass in the popular vote by 138,000 votes, he came 79,000 votes shy of a majority. Thus, with 47% of the popular vote, Taylor was elected as a minority president.

A study of the county returns reveals that Free Soil strength drawn at the expense of the major parties differed by region. In the East North Central States, it appears at least the majority of the Free Soil strength was drawn from the Whig Party.

Conversely, in the Middle Atlantic region, Free Soil bases of strength lay in the areas which had hitherto been Democratic, particularly in New York and northern Pennsylvania. The Free Soil Democrats nomination of Van Buren made the victory of Taylor nearly certain in New York. On election day, enough Democratic votes were drawn away by Van Buren to give the Whig ticket all but two Democratic counties, thus enabling it to carry hitherto impregnable parts of upper New York state. The Democrats, confronted with an irreparable schism in New York, lost the election.

In New England, the Democratic vote declined by 33,000 from its 1844 level, while the Whig vote likewise declined by 15,000 votes. The third-party vote tripled, and the total vote remained nearly stationary—a partial indication, perhaps, of the derivation of the Free Soil strength in this section. For the first time since the existence of the Whig Party, the Whigs failed to gain an absolute majority of the vote in Massachusetts and Vermont. In addition, the Democrats failed to retain their usual majority in Maine; thus only New Hampshire (Democratic) and Rhode Island (Whig) of the states in this section gave their respective victorious parties clear-cut majorities.

Of the 1,464 counties/independent cities making returns, Cass placed first in 753 (51.43%), Taylor in 676 (46.17%), and Van Buren in 31 (2.12%). Four counties (0.27%) in the West split evenly between Taylor and Cass. This was the first time in the Second Party System in which the victorious party failed to gain at least a plurality of the counties as well as of the popular vote.

As one historian remarks, somewhat sarcastically, practically the only thing it decided was that a Whig general should be made President because he had done effective work in carrying on a Democratic war.