This sect is called the Hanafī sect because of its imām, Abī Hanīfah.
Abī Hanīfah's full name is al-Nu‛mān bin Thābit bin Zūtī al-Fārsī. His forefathers were from Kabul. Abī Hanīfah was born in the 80thA.H. and died in the year 150 in Baghdad.
Abī Hanīfah grew up in Kūfa and spent half of his lifetime working as a merchant before he became a seminary student and teacher. He studied under Hammād bin Abī Salamah for eighteen years before he became a scholar himself. He was one of the big scholars of his time and reached the level of ijtihād. He accepted voting and syllogism qiyas in addition to the Qurān and prophetic traditions as tools for deriving religious rulings or fatwa. Many scholars of his time refuted him on this issue. In this regard, both Imām Muhammad al-Bāqir (a) and Ja‛far al-Sādiq (a) said that when making a fatwa one must stick only to the Qurān and the prophetic traditions.
His sect spread in Iraq and later in other areas of the Islamic world. Abī Hanīfah lived for 52 years during the Umayyad reign, but did not accept them. Rather, he believed that the rule khilafat should be given to the family of ‛Alī (a). He even ruled in favor of the ‛Alawī uprising lead by Zayd bin ‛Alī bin al-Hussayn bin ‛Alī bin Abī Tālib and allowed money that was collected from zakāt taxe to be spent on the uprising. It should be mentioned that Zayd bin ‛Alī bin al-Hussayn tutored Abī Hanīfah for two years and ‛Abduallah bin al-Hussayn bin ‛Alī bin Abī Tālib was also one of his tutors.
The Umayad rulers asked him to become a judge and he refused. Because of this, they put him in prison and whipped him for days, until he was on the brink of death. Then, the prison warden helped him to escape and he fled to Mecca. Afterwards, he was travelling between Mecca and Medina pretending to be a nomad. During this period of time he studied for two years under Imām al-Sādiq (a). He has a famous saying describing this experience: "If it wasn't for these two years, al-Nu‛mān would have perished." He stayed there until the end of rule of the Umayyad dynasty on the hands of the Abbasid dynasty.
When the Abbasid dynasty came to power, Abī Hanīfah refused to help them. Al-Mansūr imprisoned him and ordered him to be lashed 120 times which resulted in his death.