Cócorit is a town located in the municipality of Cajeme in the southern part of the Mexican state of Sonora. The name of the town is derived from the Yaqui (Yoeme) word for a chili pepper, ko'oko'i. Cajeme is located in the Yaqui Valley. The comisario municipal ("municipal commissioner") is Ing. Arturo Soto Valenzuela. Cócorit reported a 2005 census population of 7,953 inhabitants, and is the fifth-largest town in the municipality of Cajeme (after Ciudad Obregón, Esperanza, Pueblo Yaqui, and Tobarito).
The town was founded in 1617 by the Spanish Jesuit missionaries Andrés Pérez de Ribas and Tomás Basilio, although the Spanish inhabitants were eventually forced to leave by the Yaqui native population of the area. In 1835 the town was reestablished, this time in an independent Mexico; the town was a dependency of the municipio of Buenavista. In 1867, the governor of Sonora (Pesqueira) organized two successful military expeditions to control the Yaquis in Cócorit, and in neighboring Guaymas. In 1875, Cajemé, a prominent Yaqui leader, attacked Cócorit, setting the town on fire. Under the protection of the Mexican army, Cócorit was repopulated in 1885 with inhabitants from the neighboring towns of El Quiriego and Baroyeca. In 1886, the Yaquis continued to strengthen their positions, but the state and federal governments confiscated more than 20,000 head of livestock that belonged to the Yaquis, weakening their position. In 1887 Cajemé was captured. After an interview with Ramón Corral, Cajemé was taken in the custody of a Mexican army detachment led by Lieutenant Clemente Patiño to El Médano on the steamboat "Demócrata." He paraded through some of the Yaqui towns, and was then shot by the detachment on the pretense that he was trying to escape.