Ibn Hazm served as a minister in the Umayyad government, under the Caliphs of Córdoba, and was known to have worked under Al-Mansur Ibn Abi Aamir, Hajib (Grand Vizier) to the last of the Ummayad caliphs, Hisham III. From the death of the grand vizier al-Muzaffar in 1008, however, the Caliphate of Cordoba became embroiled in a civil war that lasted until 1031 resulting in its collapse and the emergence of many smaller states called the Taifa's. Ibn Hazm's father died in 1012 and Ibn Hazm continued to support the Umayyads, for which he was frequently imprisoned. By 1031 Ibn Hazm retreated to his family estate and Manta Lisham and had begun to express his activist convictions in the literary form.
According to a saying of the period, "the tongue of Ibn Hazm was a twin brother to the sword of al-Hajjaj" (a famous 7th century general and governor of Iraq)[6] and he became so frequently quoted that the phrase “Ibn Hazm said” became proverbial.