Torre Alháquime was officially founded in the 7th to 8th century, during the Moorish (Muslim) occupation of the area. They constructed a castle of Nazarí style and fortified the region surrounding the town.
The name ‘Torre Alháquime’ is a combination of Spanish and Muslim, “torre” meaning tower and “al-haquime” meaning wise or learned.
The town was taken by Christian forces in 1327 but fell back into Muslim hands in 1333, and was under Muslim rule until the beginning of the 15th century. After then, the Ribera family took control over the land. In 1485, the Marquis of Cádiz conquered the town, only to return it to the Ribera family. Conflicts ensued and the town changed owners frequently; from the Ribera, the town went to the duchy of Alcalá de los Gazules, then to the House of Medinaceli.
During the War of Independence, the French occupied the tower from 1810 to 1812.
The constant feuding over the lands became a characteristic and a problem of most Spanish towns well until the early 20th century.