Educated by tutors on his father's plantation near Louisville, Kentucky, Taylor joined the regular army as an infantry officer in 1808. During the War of 1812, he distinguished himself under William Henry Harrison. In following years he saw duty in the Northwest and Louisiana before the outbreak of the Blackhawk War in 1832 in which he participated. In 1838, during the Second Seminole War, he defeated the Indians in the Battle of Lake Okeechobee, which earned his promotion to brigadier general. After a period of stationing at the southwest border areas, Taylor was sent by President Polk to recover disputed lands in Texas. He defeated Mexican units at Roseca de la Palma and Palo Alto in 1846 which led to his widespread fame and a declaration of war by the U.S. Promoted to major general, he captured Matamoros and Monterrey later in 1846. In early 1847, Taylor defeated a numerically superior force under the Mexican president Santa Anna at Buena Vista which solidly established his status in the nation.
The Whig party nominated Taylor for the presidency in 1848 and he firmly defeated the Democratic and Free-Soil candidates. During his short tenure, Taylor favored immediate statehood for California and New Mexico, but was opposed by southerners after California prohibited slavery. Taylor refused to compromise and rejected Henry Clay's proposals which attempted to balance concessions to north and south. Taylor fell ill and died on July 9, 1850 and his death paved the way for the Compromise Measures of 1850. He was succeeded by the vice-president, Millard Fillmore.