The Mihna
Ibn Hanbal was famously called before the Inquisition or Mihna of the Abassid Caliph al-Ma'mun. Al-Ma'mun wanted to assert the religious authority of the Caliph by pressuring scholars to adopt the Mu'tazila view that the Qur'an was created rather than uncreated. According to Sunni tradition, ibn Hanbal was among the scholars to resist the Caliph's interference and the Mu'tazila doctrine of a created Qur'an—although some Orientalist sources raise a question on whether or not he remained steadfast
Due to his refusal to accept Mu'tazilite authority, ibn Hanbal was imprisoned in Baghdad throughout the reign of al-Ma'mun. In an incident during the rule of al-Ma'mun's successor, al-Mu'tasim, ibn Hanbal was flogged to unconsciousness. However, this caused upheaval in Baghdad and al-Ma'mun was forced to release ibn Hanbal. After al-Mu’tasim’s death, al-Wathiq became caliph and continued his predecessors policies of Mu'tazilite enforcement and in this pursuit, he banished ibn Hanbal from Baghdad. It was only after al-Wathiqu's death and the ascent of his brother al-Mutawakkil, who was much friendlier to the more traditional Sunni dogma, that ibn Hanbal was welcomed back to Baghdad.
Read more about this topic: Ahmad Ibn Hanbal