Jean Foncin, a Frenchman, designed the fort in 1798, and it was built between 1798 and 1800 on the site of the older Fort Whetstone. It was named for James McHenry, a signer of the Constitution and the Secretary of War at the time.
On September 13 and 14, 1814, British warships bombarded the fort for 25 hours during the War of 1812. A chain of 22 sunken ships and the fort's cannons kept the ships from entering the harbor.
A huge flag, 30 by 42 feet, was raised on the morning of September 14. Francis Scott Key saw it and wrote a poem that was set to music and became "The Star-Spangled Banner". The fort became a national park in 1925 and a national monument in 1939.

