He won the general election alongside New York politician Millard Fillmore, defeating Democratic Party nominees Lewis Cass and William Orlando Butler, as well as a third-party effort led by former president Martin Van Buren and Charles Francis Adams Sr. of the Free Soil Party. Taylor became the first president to be elected without having previously held political office. As president, he kept his distance from Congress and his Cabinet, even though partisan tensions threatened to divide the Union. Debate over the status of slavery in the Mexican Cession dominated the national political agenda and led to threats of secession from Southerners. Despite being a Southerner and a slaveholder himself, Taylor did not push for the expansion of slavery, and sought sectional harmony above all other concerns. To avoid the issue of slavery, he urged settlers in New Mexico and California to bypass the territorial stage and draft constitutions for statehood, setting the stage for the Compromise of 1850.
Taylor died suddenly of a stomach disease on July 9, 1850, with his administration having accomplished little aside from the ratification of the Clayton–Bulwer Treaty and having made no progress on the most divisive issue in Congress and the nation: slavery. 