Huancavelica was a strategic Inca center and shortly after the conquest the Spanish discovered its mineral wealth: mercury and silver deposits that made developing Huancavelica worthwhile. By 1564 the Spaniards were sending indigenous Peruvian slaves here to work the mercury and silver mines. The results (for Spain, at any rate) were lucrative. The Viceroy of Peru was even declaring by the mid-17th century that, together with Potosí (now in Bolivia) Huancavelica was one of the two pillars of the kingdom.
The present town was founded in 1571 under the name of Villa Rica de Oropesa (Rich Town of the Lord), somewhat ironic given that Huancavelica is today the poorest city in Peru.