[Ed. – It’s a question that seems to be on everyone’s mind. The short answer is that it not only could happen but has happened, albeit not to a U.S. president.]
William Belknap, the war secretary to President Ulysses Grant, was impeached after he’d already resigned. The House of Representatives investigated Belknap for corruption, and found him to have regularly received illegal kickbacks. Articles of Impeachment were drafted, and on March 2, 1876, just minutes before the House of Representatives was scheduled to vote on them, Belknap tearfully resigned.
The House still voted to send the Articles of Impeachment to the Senate. The Senate, having determined that it retained jurisdiction over former government officials, held a full trial in the following months. House managers argued at the time that Belknap should not be allowed to escape justice by simply resigning. Ultimately, a majority of the Senate voted to convict Belknap on all articles; the vote failed to reach the two-thirds supermajority required for conviction, though, and Belknap was acquitted.