This settlement was founded in 1869 as an Indian trading post by Col. James A. Coffey, serving the population across the border in what was then the Indian Territory. The town was stimulated in 1871 by being made a stop on the Leavenworth, Lawrence & Galveston Railroad, which connected it to other markets and developments. With the arrival of the railroad, a young surveyor, Napoleon B. Blanton, was dispatched to lay out the town. The naming of the town was left to the toss of a coin between Col. Coffey and U.S. Army Captain Blanton. Coffey won the toss and the town was officially named Coffeyville.
The city was first incorporated in 1872, but the charter was voided as illegal, and the city was re-incorporated in March 1873.
As a frontier settlement, Coffeyville had its share of violence. On October 5, 1892, four of the Dalton Gang were killed in a shootout during an attempted bank robbery; Emmett Dalton survived with 23 gunshot wounds and convicted at trial for his crimes. He served 14 years before being pardoned. The gang had been trying to rob the First National and Condon banks, located across the street from each other. Residents recognized them under their disguises of fake beards and attacked the gang members as they fled one of the banks. Four citizens, including a U.S. marshal, Marshal Charles T. Connelly, died defending the town. The town holds an annual celebration each October to commemorate the Dalton Raid and the citizens who were lost.
After the discovery of its resources of plentiful natural gas and abundant clay, Coffeyville enjoyed rapid growth from 1890 to 1910, as its population expanded sixfold. From the turn of the 20th century to the 1930s, it was one of the largest glass and brick manufacturing centers in the nation. During this same period, the development of oil production attracted the founding of several oil field equipment manufacturers, and more workers and residents.
Coffeyville industrialist Douglas Brown founded Coffeyville Multiscope, which produced components of the Norden bombsight. This played a determining role in the perfection of precision daylight bombing during World War II as a result of the bombsight's advanced accuracy and drift correction capability.
In 1930 residents in Coffeyville organized a Church of Latter Day Saints (LDS) Sunday school; it was one of only 11 places in Kansas to have such a facility then.
On July 1, 2007, Coffeyville suffered a major flood when the Verdigris River crested at 10 feet above flood stage and flooded approximately a third of the city. The flood topped the local refinery (Coffeyville Resources LLC) levees by 4 feet, allowing oil to pollute the water. Approximately 1700 barrels (71,000 gallons) of crude oil mingled with the already contaminated flood waters. The EPA worked to prevent the oil and flood water mix from continuing downriver, where it could damage the water in Oologah Lake near Oologah, Oklahoma. Many residential water supplies are drawn from that lake. A minimal amount of oil reached Oolagah Lake, and it did not pose a threat to the water supplies of other cities along the Verdigris River or from the lake. A number of animals were found dead or injured in flood areas, covered with oil.
By July 2, areas east of Patterson Street were off limits, and a curfew was enacted in other areas of the city. On July 3, the city lost its supply of potable water, but the water service was restored and the order to boil water rescinded on July 7. The Federal Emergency Management Agency (FEMA) and the Red Cross came to aid residents, and Kansas Governor Kathleen Sebelius and President George W. Bush declared the city a federal disaster area. Most displaced residents found shelter with family and friends, but many were sheltered in two area churches and a senior citizens' apartment complex. Some pets were rescued to a temporary animal shelter built for them at LeClere Park.
The flooded area on the city's east side was reopened on July 11 for residents and business owners to begin assessing damage and to retrieve salvageable items.
In order to focus on the post-flood recovery and clean-up, the city and state cancelled the 2007 Inter-State Fair & Rodeo. The ongoing flood recovery included a wholesale environmental remediation of the flood-affected eastern portion of the city, which continued through late 2008 to early 2009. Many of the flood-damaged homes were purchased by Coffeyville Resources LLC as a part of its effort to compensate the homeowners affected by the oil spill.