Historians have argued for decades that the Second Amendment has nothing to do with the right to own a handgun nor even with the right to use a gun in self-defense. Nevertheless, a counternarrative—bolstered by the National Rifle Association—has triumphed in the popular mind and been codified to some extent in the Supreme Court’s ruling in District of Columbia v. Heller (2008), which said that the Second Amendment “protects an individual right to possess a firearm.”
The meaning of the Second Amendment is controlled by the reference in the opening clause to a militia: “A well regulated militia, being necessary to the security of a free state, the right of the people to keep and bear arms, shall not be infringed.” Whatever “right” is being identified here clearly has to do with the public purpose (ensuring “the security of a free state”) for which a militia is created. Scholars have pointed out that the very term “bear arms” makes it clear that a military context is envisioned (it doesn’t say “carry a weapon”).
Historians Kevin M. Sweeney and Saul Cornell have looked closely at the context for passage of the amendment, and in a recent article they point out that in the 1780s the states and the federal government were debating who had responsibility to form and pay militias in times of civil disturbance. In this era, explain Sweeney and Cornell,
many state militias no longer appeared to be capable of ensuring what the Second Amendment would call the "security of a free State" without improved organization, better training, and thousands of publicly supplied military muskets with bayonets. Americans were not worried that agents of the new federal government would come, door to door, to take away their squirrel guns, trade guns, fowlers, and pistols. Nor was the problem that concerned them the disarmament of some imaginary "people's militia" or "civilian militia"—rhetorical terms found in the Heller decision that have no historical basis. Instead, the very real danger was that the existing state militias would be disarmed by simple federal inaction.
Anti-Federalists such as George Mason wanted reassurance that, "in case the general government should neglect to arm and discipline the militia there should be an express declaration, that the state governments might arm and discipline them." It was in that context that the Second Amendment emerged and was ratified in 1791.