Cooper was recommissioned as lieutenant-colonel of the 4th Kentucky Cavalry on March 26, 1863 and became its colonel in April; following the resignation of Col. Bayles. On June 4, 1863, Cooper was injured when a horse fell on him in Franklin, Tennessee. He commanded the regiment at the Battle of Chickamauga in September 1864. Cooper returned to Lexington, Kentucky in 1864 for sick leave. Then Cooper led local forces against John Hunt Morgan's raiders. He refused Morgan's demands for the surrender of Lexington on June 9, 1864 and repulsed his troops. In April 1865 he commanded the post of Montgomery, Alabama and in May and July 1865 the post of Albany, Georgia. He was honorably mustered out on August 21, 1865 at Macon, Georgia. He received battle honors for his service at Shiloh, Corinth, Richmond, Chickamauga, Morgan's Raid into Kentucky, the Battle of Resaca and for Wilson's Raid on Montgomery. He was brevetted to Lt. Colonel and Colonel in the Regular Army on March 2, 1867, for gallant and meritorious services at the Battle of Resaca in Georgia and in the capture of Montgomery, Alabama.