At the beginning of the Civil War, Leggett served as a volunteer on the staff of his friend, Major General George B. McClellan in western Virginia. He helped raise the 78th Ohio Infantry Regiment and was commissioned as its colonel in January 1862. He commanded his regiment at the battles of Fort Donelson, Shiloh, and Corinth. In November 1862, he was appointed brigadier general of volunteers and participated in the Vicksburg Campaign, suffering a painful wound. After he recovered, Leggett commanded the 3rd Division of the XVII Corps during the Atlanta Campaign and Sherman's March to the Sea. He was brevetted major general of volunteers in July 1864, and was commissioned as a major general a year later. His last action was in the Carolinas Campaign during the spring of 1865.