1840 United States elections

The 1840 United States elections elected the members of the 27th United States Congress, taking place during the Second Party System. In the aftermath of the Panic of 1837, the Whigs become the fourth party in history to win control of the presidency and both houses of Congress; the Whigs would never again accomplish this feat. The election also marked the first time since the 1834 elections that the Democratic Party did not control the presidency and both chambers of Congress.

In the presidential election, Whig General William Henry Harrison defeated Democratic President Martin Van Buren. Harrison won by a margin of 5% in the popular vote, but dominated the electoral college. Harrison was nominated at the 1839 Whig National Convention, the first convention in Whig history. Harrison's victory made him the first president unaffiliated with the Democratic-Republican Party or the Democratic Party to win election since John Adams in 1796. Martin Van Buren's defeat made him the third president to fail to win re-election, following John Adams and John Quincy Adams.

The 1840 presidential election was one of major controversy. Because the election took place during the rise of the Second Party System, rising levels of voting interest and party loyalty proved that this election was going to be controversial. The incumbent Democratic candidate, President Martin Van Buren, was dubbed "Martin Van Ruin" because of his less-than-ideal previous term where he failed to address a financial crisis, ran for re-election over Whig candidate William Henry Harrison. The Whigs chose William Henry Harrison because of his similarities to former president Andrew Jackson in the sense that he was a war hero and a man of the people. This approach proved successful because William Henry Harrison won the election by dominating the electoral college, despite winning by only 5% of the popular vote.

In the House, Whigs won major gains, taking the majority. In the Senate, Whigs picked up several seats, taking the majority. This marked the second of three times in American history where one party flipped both chambers of Congress and the Presidency in a single election, along with 1800 and 1952.