Fort Stockton, constructed of adobe and named for Lt. Edward Dorsey Stockton, an officer in the First Infantry who had died in San Antonio in 1857, was established by the United States Army on January 17, 1859, at Comanche Springs, which was within the site of the present city of Fort Stockton, for the protection of the mail service, travelers, and freighters. Comanche Springs was on the Comanche war trail into Mexico, the upper and lower San Antonio-El Paso-San Diego roads, the Butterfield Overland Mail route, and the San Antonio-Chihuahua Trail, and near the Pecos River-New Mexico road. Capt. Arthur T. Lee, commanding Company C, Eighth Infantry, on order of Col. Carlos A. Waite, who commanded all federal troops in Texas, abandoned the post in April 1861. On June 26 the post was reoccupied by Capt. Charles L. Pyron, in command of Company B, Second Regiment, Texas Mounted Rifles. It was abandoned by the Confederates in August 1862, after Gen. Henry H. Sibley's defeat in New Mexico.
On July 21, 1867, Fort Stockton, in ruins after the Civil War, was reoccupied by Gen. Edward Hatch, who made it the headquarters for the Ninth United States Cavalry, a regiment of black troops. Hatch built a new post nearby at a cost of $82,000 on land the federal government neither owned nor had leased. Except for the stone guardhouse, the buildings had stone foundations, adobe walls, and dirt roofs. The troops quartered at the post were used for patrols, escorts, and scouts, largely against the Apaches. In 1882, after the Apaches had been defeated, the army began withdrawing the troops. The last contingent, a company of the Third Cavalry and two companies of the Sixteenth Infantry, commanded by Maj. George A. Purington, left on June 26–27, 1886.
By providing protection to travelers and settlers, a market for stockmen, irrigation farmers, and merchants, and employment for freighters, mechanics, and laborers, Fort Stockton promoted the establishment and development of a thriving community. Since their abandonment by the military, some of the officers' quarters have been used continuously for residences. In 1936 the state erected a marker at the site of the fort on the grounds of the Pecos County Courthouse .