At the beginning of the Civil War, Gray enlisted as a
private in a Mississippi
infantry regiment in January 1861, until his friend
Jefferson Davis called him to go back to Louisiana to raise a regiment. In April and early May 1862, Gray organized the
28th Louisiana Infantry Regiment at Camp Taylor and was elected as its
colonel. He and his men were mustered into the Confederate Army on May 2. On April 14, 1863, Gray was wounded in the fighting near
Bayou Teche, Louisiana. Department commander
Edmund Kirby Smith ordered his promotion to
brigadier general on April 8, however the Confederate Congress disallowed it. Gray was given
brigade command in
Polignac's
Division in April. Gray was elected to represent his northwestern Louisiana congressional district to the Second Confederate Congress, a position he had not sought nor had any knowledge of until notified of his election. He subsequently left the army in camp at
Camden, Arkansas, and traveled to
Richmond, Virginia. He was promoted to brigadier general on March 17, 1865, backdated to the Mansfield fight, and Gray rejoined his brigade in Polignac's Division until the end of the war. There is no record of his being paroled from the U.S. Government. ==Postbellum activities==