Francis Scott Key napsal text poté, co byl svědkem britského bombardování Fort McHenry v Baltimoru během války v roce 1812.