Fort McHenry Fort McHenry , in Baltimore , Maryland , is a coastal star - shaped fort best known for its role in the War of 1812 , when it successfully defended Baltimore Harbor from an attack by the British navy in Chesapeake Bay September 13 – 14 , 1814 . It was during the bombardment of the fort that Francis Scott Key was inspired to write " The Star - Spangled Banner , " the poem that would eventually be set to the tune of " To Anacreon in Heaven " and become the national anthem of the United States . History . 18th Century . Fort McHenry was built on the site of the former Fort Whetstone , which had defended Baltimore from 1776 to 1797 . Fort Whetstone stood on Whetstone Point ( today ' s residential and industrial area of Locust Point ) peninsula , which juts into the opening of Baltimore Harbor between the Basin ( today ' s Inner Harbor ) and Northwest branch on the north side and the Middle and Ferry ( now Southern ) branches of the Patapsco River on the south side . The Frenchman Jean Foncin designed the fort in 1798 , and it was built between 1798 and 1800 . The new fort ' s purpose was to improve the defenses of the increasingly important Port of Baltimore from future enemy attacks . The new fort was constructed in the form of a five - pointed star surrounded by a dry moat — a deep , broad trench . The moat would serve as a shelter from which infantry might defend the fort from a land attack . In case of such an attack on this first line of defense , each point , or bastion could provide a crossfire of cannon and small arms fire . Fort McHenry was named after early American statesman James McHenry ( 16 November 1753 – 3 May 1816 ) , a Scots - Irish immigrant and surgeon - soldier . He was a delegate to the Continental Congress from Maryland and a signer of the United States Constitution . Afterwards , he was appointed United States Secretary of War ( 1796 – 1800 ) , serving under presidents Presidents George Washington and John Adams . 19th Century . War of 1812 . Beginning at 6 : 00 A . M . on 13 September 1814 , British warships under the command of Vice Admiral Alexander Cochrane continuously bombarded Fort McHenry for 25 hours . The American defenders had 18 , 24 , and 38 pound ( 8 , 11 and 17 kg ) cannons with a maximum range of 1 . 5 miles ( 2 . 4 km ) . The British guns had a range of 2 miles ( 3 km ) , and their rockets had a 1 . 75 - mile ( 2 . 8 - km ) range , but neither guns nor rockets were accurate . The British ships were unable to pass Fort McHenry and penetrate Baltimore Harbor because of its defenses , including a chain of 22 sunken ships , and the American cannons . They were , however , able to come close enough at maximum range to fire rocket s and mortar s at the fort . Due to the poor accuracy of the British weapons at maximum range , and the limited range of the American guns , very little damage was done on either side before the British ceased their attack on the morning of 14 September due to a lack of ammunition . Thus the naval part of the British invasion of Baltimore had been repulsed . Only one British warship , a bomb vessel , received a direct hit from the fort ' s return fire , which wounded one crewman . The Americans were under the command of Brevet Lt . Col . George Armistead . They did suffer casualties , amounting to four killed and 24 wounded , including one African - American soldier and a woman who was cut in half by a bomb as she carried supplies to the troops . At one point during the bombardment , a bomb crashed through the fort ' s powder magazine . Fortunately for the defenders , either the fuse was extinguished by the rain or the bomb was merely a dud . Star Spangled Banner . Francis Scott Key , a Washington lawyer who had come to Baltimore to negotiate the release of Dr . William Beanes , a civilian prisoner of war , witnessed the bombardment from a nearby truce ship . An oversized American flag had been sewn by Mary Pickersgill for $ 405 . 90 in anticipation of the British attack on the fort . When Key saw the flag emerge intact in the dawn of September 14 , he was so moved that he began that morning to compose the poem " The Defence of Fort McHenry " which would later be renamed " The Star - Spangled Banner " and become the United States ' national anthem . Civil War . During the American Civil War the area where Fort McHenry sits served as a military prison , confining both Confederate soldiers , as well as a large number of Maryland political figures who were suspected of being Confederate sympathizers . The imprisoned included newly elected Baltimore Mayor George William Brown , the city council , and the new police commissioner , George P . Kane , and members of the Maryland General Assembly along with several newspaper editors and owners . Ironically , Francis Scott Key ' s grandson , Francis Key Howard , was one of these political detainees . A drama beginning the famous Supreme Court case involving the night arrest in Baltimore County and imprisonment here of John Merryman and the upholding of his demand for a writ of " habeas corpus " for release by Chief Justice Roger B . Taney occurred at the gates between Court and Federal Marshals and the commander of Union troops occupying the Fort under orders from President Abraham Lincoln in 1861 . Fort McHenry also served to train artillery at this time ; this service is the origin of the Rodman gun s presently located and displayed at the fort . 20th Century . World War I . During World War I , an additional hundred - odd buildings were built on the land surrounding the fort in order to convert the entire facility into an enormous U . S . Army hospital for the treatment of troops returning from the European conflict . Only a few of these buildings remain , while the original fort has been preserved and restored to essentially its condition during the War of 1812 . World War II . During World War II , Fort McHenry served as a Coast Guard base , helping to defend the port of Baltimore from invasion . National monument . The fort was made a national park in 1925 ; on August 11 , 1939 , it was redesignated a " National Monument and Historic Shrine , " the only such doubly designated place in the United States . It was placed on the National Register of Historic Places on October 15 , 1966 . It has become national tradition that when a new flag is designed it first flies over Fort McHenry . The first official 49 and 50 star American flags were flown over the fort and are still located on the premises . Fort McHenry Today . The Fort has become a vital center of recreation for the Baltimore locals as well as a prominent tourist destination . Thousands of visitors come each year to see the " Birthplace of the Star Spangled Banner . " It ' s easily accessible by Water Taxi from the popular Baltimore Inner Harbor , which increases its appeal with tourists . Every September the City of Baltimore commemorates Defenders Day in honor of the Battle of Baltimore . It is the biggest celebration of the year at the Fort , accompanied by a weekend of programs , events , and fireworks . In 2005 the Living History volunteer unit , the Fort McHenry Guard , was awarded the George B . Hartzog award for serving the National Park Service as the best volunteer unit . Among the members of the unit is Martin O ' Malley , the former mayor of Baltimore , and current Governor of Maryland , who was made the unit ' s honorary colonel in 2003 . The flag that flew over Fort McHenry , the Star Spangled Banner Flag , has deteriorated to an extremely fragile condition . After undergoing restoration at the National Museum of American History it is now on display there in a special exhibit that allows it to lie at a slight angle in dim light . The United States Code presently authorizes Fort McHenry ' s closure to the public in the event of a national emergency for use by the military for the duration of such an emergency .