The Lafayette Artillery Company was founded in Peterborough, New Hampshire, in 1804 as the Artillery Company of the 22nd Regiment. It was part of the State of New Hampshire's artillery system, a forerunner to the National Guard. The group has continued to operate continuously since its founding, and since 1833 it has been headquartered at Lyndeborough, New Hampshire. Since the 1980s, it has been primarily an educational service organization, and participates in Civil War reenactments throughout the northeastern United States.
In 1804, in the wake of the reorganization of New Hampshire's state militia system, several new artillery companies were founded around New Hampshire. These included units in Somersworth, Walpole, Keene, Fitzwilliam, and Peterborough. Peterborough's artillery unit belonged to the Twenty-Second Regiment, a unit consisting of infantry companies from New Ipswich, Sharon, Mason, Temple, Wilton, and Peterborough. James Wilson, a lawyer and state legislator, served as the group's first captain. At the time, military service was compulsory, and being a member of the artillery was an honor—or at least it was more prestigious than being a member of the infantry. Little else is known about the artillery's early years except that, in response to the British Navy's blockade of New England during the War of 1812, several of its members served in the defense of Portsmouth in 1814.