When the Civil War began in April 1861, Lyon was promoted to first lieutenant. However, his sympathies were with the Confederacy and he resigned from the United States Army. He raised Company F, 3rd Kentucky Infantry, which soon became part of the 1st Kentucky Artillery. Lyon equipped the unit, which initially was known as Lyon's Battery, later Cobb's Battery. In January 1862 Lyon was promoted to lieutenant colonel of the 8th Kentucky Infantry and exercised command in the absence of the colonel. Lyon's regiment was part of the garrison of Fort Donelson, Tennessee. After fighting off three attacks by the Union Army, the fort finally surrendered to Ulysses S. Grant. Lyon was sent as a prisoner of war. first to Camp Morton, at Indianapolis and then to Camp Chase, Ohio. He and other captured officers were sent taken to Fort Warren, where he was finally exchanged in September. His regiment was soon reorganized as the 8th Kentucky, now re-enlisted for three years, with Lyon appointed as its colonel. He fought in the forces of Earl Van Dorn and then John C. Pemberton during the Vicksburg Campaign. He and 250 of his men managed to avoid surrendering to Grant, and Lyon led them to Jackson, Mississippi, where they joined the Confederate forces there. Later, Braxton Bragg appointed Lyon as commander of two regiments of cavalry under Joseph Wheeler, and he served under James Longstreet during the Siege of Knoxville. Following the Third Battle of Chattanooga, Lyon was placed in charge of Bragg's artillery, saving them from capture during his subsequent retreat. Lyon returned to commanding cavalry in 1864, this time in Mississippi as a brigadier general under Nathan B. Forrest. In December 1864, he led 800 Kentucky cavalrymen on a raid into Tennessee and western Kentucky both to enforce Confederate draft laws and to draw Union troops away from General John Bell Hood's Nashville campaign. His men burned seven county courthouses that were being used to house Union troops, including those at Princeton, Marion and Hopkinsville. He retreated south after the Confederate defeat at the Battle of Nashville to rejoin Forrest in Mississippi. In January 1865, Lyon was surprised while sleeping in a private home in Red Hill, Alabama, by a detachment of the 15th Pennsylvania Cavalry. After he was captured, he shot and killed the Union sergeant who captured him, Arthur Lyon, by asking to retrieve his clothes and grabbing a hidden pistol, then escaped in his nightgown.
Postbellum
When the war ended, Lyon accompanied Governor Isham G. Harris of Tennessee into Mexico, intending to offer his services to King Maximilian. He was a civil engineer in Mexico for nearly a year before finally returning to his home in Eddyville, Kentucky, where he resumed farming and opened a prosperous mercantile business. He also served as state prison commissioner, primarily responsible for what is now the Kentucky State Penitentiary being located in his hometown of Eddyville. His initials are still inscribed over the Kentucky State Penitentiary's front gate. Lyon was married three times—first in 1861 to Laura O'Hara who died in 1865, with whom he had a son; second in 1869 to Grace Machen, who died in 1873, with whom he had four children; and third in 1887 to Ruth Wolf, who died in 1952, with whom he had two children. Hylan Lyon was the father ofFrank Lyon of the USS Oregon.