During the War of 1812 British Chesapeake Campaign, William Doughty served as a militia captain and was incorrectly named in the military records as John Doughty. In 1813, Doughty formed the quasi-militia Navy Yard volunteers and drilled them regularly after Navy Yard working hours. This military unit became known as the "Navy Yard Rifles", becoming a volunteer rifle company that served under the command of Major Robert Brent of the 2nd Regiment of the District of Columbia Militia, who was the first mayor of Washington, D.C., in the defense of the capital city which resulted in the disastrous defeat in August 1814 at the Battle of Bladensburg.