David Gaskill Swaim (1834–1897) was Judge Advocate General of the United States Army from February 18, 1881 to December 22, 1894.
Born in Salem, Ohio, Swaim became a lawyer in 1859. With the outbreak of the American Civil War, he joined the 65th Ohio Infantry as a first lieutenant. He was later promoted to adjutant of his regiment, and then acting adjutant of the brigade. He was wounded at the battles of Shiloh and Chickamauga and was promoted to captain.
When the war ended, he remained in the Army, serving in the Judge Advocate General's Corps until 1879, when President Rutherford B. Hayes appointed him Judge Advocate General and promoted him to brigadier general. He was a companion of the District of Columbia Commandery of the Military Order of the Loyal Legion of the United States.
Later life and death
In 1884, charges of financial improprieties were levied against him, and he was suspended from duty. President Grover Cleveland reinstated him, and he retired immediately afterward. He died three years later at his home in Washington, D.C..