In 1840, Webster unwittingly missed a chance to be president. He declined an offer to be the Whig vice president under William Henry Harrison, a post that went to John Tyler. He served President Tyler with distinction as Secretary of State, however, and was the architect of the treaty that established the eastern border of the United States and Canada and signaled a lasting peace between the two great English-speaking nations of the world.
In 1848, he made another bid for the top job. No dice. Zachary Taylor was the Whig candidate, and again Webster was offered the second spot. "I do not propose to be buried until I am dead," he said of the offer. Taylor was dead and buried in 1850 and Millard Fillmore became president.
On March 7, 1850, Webster spoke on the Senate floor at length in support of the various pieces of legislation later called the Compromise of 1850, which is known as his March 7 Speech. He spoke, famously, "not as a Massachusetts man, nor as a Northern man but as an American..." His efforts helped win passage of the bills, including the notorious Fugitive Slave Law, but turned New England abolitionists bitterly against him and doomed Webster's last attempt at the Whig presidential nomination in 1852. In any case, he died toward the end of that year after a fall from a horse.