During the American Revolution, Lancaster in Pennsylvania became the capital of the United States for just one day.

This happened because Congress evacuated Philadelphia and chose to relocate to Pennsylvania.

Source