Cooper's service in the Second Seminole War of 1841–42 was a rare departure for him from Washington, D.C. He was chief of staff for Col. William J. Worth. After hostilities ended, he returned to staff duty in Washington from 1842 to 1845.Dupuy, pp. 189–90. Cooper received a brevet promotion to colonel on May 30, 1848, for his War Department service in the Mexican–American War, and was promoted to the permanent rank of colonel in the regular army and appointed the army's Adjutant General on July 15, 1852. Cooper also served very briefly as acting U.S. Secretary of War in 1857.Eicher, p. 185. He held the position from March 3 to 6, 1857.
