Maxey was promoted to brigadier general to rank from May 4. The regiment was badly mauled at the Battle of Shiloh, but he was not present. In fact he saw very little action during this period. He did see action at the Siege of Port Hudson in 1863. In December 1863, General Maxey was assigned as commander of the Indian Territory. His early success in conducting raids and capturing supplies prevented a Union Army invasion of Texas. He was assigned to duty as a major general by General Edmund Kirby Smith, but this appointment was never approved for this rank by Confederate President Jefferson Davis nor confirmed by the Confederate Senate. In 1865 he was ordered to Houston, Texas, to take command of a Division. He turned over command of the Indian Territory to Brigadier General Stand Watie, a Cherokee, on February 21, 1865, and proceeded to Houston, Texas. Maxey's new command was plagued by desertions and his inability to get supplies and equipment. Frustrated and discouraged, he was allowed to resign on May 22, 1865. He returned home to Paris, and formally surrendered in July to Union Major General Edward Canby (E.R.S. Canby). Although nominally a prisoner of war, he remained at home on parole. Later political career As a senior officer of the Confederacy, Maxey was not eligible to hold political office or even practice law. In October 1865 he began his appeal for a presidential pardon. He was finally successful when President Andrew Johnson pardoned him on July 20, 1867, after a personal appeal from Maxey's former West Point classmate Ulysses S. Grant. He resumed the practice of law in Paris. In 1872 he ran for the U.S. Congress, but lost in the Democratic Party Primary to William P. McLean. In 1873, Governor Edmund J. Davis offered Maxey an appointment to the Texas District Court, but he declined due to prior involvement as a lawyer with cases before the court. In January 1875, the Texas Legislature elected him to the United States Senate where he served two terms, from March 4, 1875 until March 3, 1887. He improved postal and rail service in Texas and argued against increased tariffs. He took little interest in larger national or party affairs. The legislature named the more dynamic John H. Reagan to replace him. Maxey returned to the practice of law in Paris, this time with his wife's nephew Benjamin