Pecos started as a cattle camp on the east side of the Pecos River sometime in the later half of the 1800s. Around 1880, the camp moved across the river and a townsite was platted. Unfortunately, the title for the land wasn't secured. The legal landowner, George A. Knight, offered the Texas & Pacific Railway a place to build a depot on their new mainline, and included a gift of land for a town. The T&P accepted his offer, and tracks were laid through Pecos Station in 1881. Over the next few years, the name changed from Pecos Station to Pecos City, then finally settling on just Pecos.

In 1883, Reeves County was carved out of the northwestern end of Pecos County, and Pecos was chosen as the county seat the following year. By 1885, the town was home to 150 and it wasn't long before Pecos gained a reputation for violence; the verb "Pecosin'" was coined at this time, meaning to ambush and rob a man before tossing his body in the river.

After the turn of the century, Pecos had grown to a population of over 500. The First National Bank of Pecos was opened in 1904, and the Pecos Mercantile Company was organized in 1907. When irrigation was introduced using water from underground aquifers, Pecos thrived as an agricultural hub, with such crops as cotton, onions, and (most notably) cantaloupes. The population steadily grew for decades, reaching nearly 5,000 by 1940.

Pecos' growth was briefly accelerated after 1942, when the Pecos Army Air Field was established. Though the base closed in 1945, Pecos continued to grow in response to large-scale sulfur mining and oil drilling in Western Texas. The population peaked at nearly 15,000 during the 1970s, but after mine closures in adjacent counties it began to decline. Today the city has just less than 9,000 residents, and its largely-intact historic downtown is worth pulling off Interstate 20 to check out.