Before the Spanish, the site at "Ranas" was a mining center, principally for cinnabar which was used as a pigment. The "Ranas" site was first mined about 400C.E. In 1622 the village of "San Nicolás Tolentino en el Paraje de las Rana" was founded. In 1682 the community of Ojo de Agua de Ranas was founded.
In 1724 Viceroy Juan de Acuña, 2nd Marquis of Casa Fuerte granted the first land in the municipality. In 1728 the first Spanish mine was opened at
San Juan Nepomuceno.
In 1864 the name "San Joaquín" was first used on a map.