Samuel Cooper ( general ) Samuel Cooper ( June 12 , 1798 – December 3 , 1876 ) was a career United States Army officer , serving during the Second Seminole War and the Mexican - American War . Although little - known today , Cooper was also the highest ranking Confederate general during the American Civil War . After the conflict , he remained in Virginia as a farmer . Early life and career . Samuel Cooper was born in New Hackensack , Dutchess County , New York . He was a son of Samuel Cooper and his wife Mary Horton . In 1813 he entered the United States Military Academy at age 15 and graduated 36th in a class of 40 two years later ( the customary length of study in that period . ) He was appointed a brevet second lieutenant in the U . S . Light Artillery on December 11 , 1815 . He was promoted to first lieutenant in 1821 and to captain in 1836 . In 1827 , Cooper married Sarah Maria Mason , becoming the brother - in - law of future Confederate diplomat James M . Mason and later the father - in - law of Union General Frank Wheaton . Sarah ' s sister , Ann Maria Mason , was the mother of Confederate cavalry general Fitzhugh Lee , a nephew of Robert E . Lee . Cooper served in numerous artillery units until 1837 , when he was appointed chief clerk of the U . S . War Department . In 1838 he received a brevet promotion to major and was appointed assistant adjutant general of the Army . Nine years later , with a brevet as lieutenant colonel , he served in the same capacity . 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 , and after hostilities ended he returned to staff duty in Washington from 1842 to 1845 . 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 . Civil War service . At the beginning of the Civil War , Cooper ' s loyalties were with the South . His wife ' s family was from Virginia , and he had a close friendship with Jefferson Davis , who had also been U . S . Secretary of War . One of his last official acts as Adjutant General of the U . S . Army was to sign an order dismissing Brig . Gen . David E . Twiggs from the army . Twiggs had surrendered his command and supplies in Texas to the Confederacy ( and was shortly thereafter made a Confederate major general . ) This order was dated March 1 , 1861 , and Cooper resigned six days later . He traveled to Montgomery , Alabama , at the time the Confederacy ' s capital , to join the Confederate States Army . On reaching Montgomery , Cooper was immediately given a commission as a brigadier general on March 16 , 1861 . He served as both Adjutant General and Inspector General of the Confederate Army , a post he held until the end of the war . Cooper provided much needed organization and knowledge to the fledgling Confederate War Department , drawing on his years performing such duties as Adjutant General of the U . S . Army . On May 16 , 1861 , Cooper was promoted to full general in the Confederate Army . He was one of five men promoted to the grade at that time , and one of only seven during the war , but with the earliest date of rank . Thus , despite his relative obscurity today , he outranked such luminaries as Albert Sidney Johnston , Robert E . Lee , Joseph E . Johnston , and P . G . T . Beauregard . Cooper reported directly to Confederate President Jefferson Davis . " At the war ' s end in 1865 , Cooper surrendered and was paroled on May 3 at Charlotte , North Carolina . Postbellum life . Cooper ' s last official act in office was to preserve the official records of the Confederate Army and turn them over intact to the United States government , where they form a part of the " Official Records " , " The War of the Rebellion : a Compilation of the Official Records of the Union and Confederate Armies " , published starting in 1880 . Military historians have highly regarded Cooper for this action . Historian Ezra J . Warner believed that in doing so Cooper was " thereby making a priceless contribution to the history of the period . " After the war , Cooper was a farmer at his home , Cameron , near Alexandria , Virginia . His house had been taken over by the U . S . government during the war and turned into a fort , but he was able to move into what had been an overseer ' s house . Due to his age Cooper earned a meager living . On August 4 , 1870 , Robert E . Lee , on the behalf of other former Confederates , sent Cooper $ 300 . Lee wrote to him saying , " To this sum I have only been able to add $ 100 , but I hope it may enable you to supply some immediate want and prevent you from taxing your strength too much . " Samuel Cooper died at his home in 1876 , and is buried there in Christ Church Episcopal Cemetery .