Habib heavily contributed in the Battle of Karbala. He fought with the third Shia Imam, Husayn ibn Ali against the forces of Yazid, led by Umar ibn Sa'ad. Umar ibn Sa'ad was the son of Sa'ad ibn Abi Waqqas, who introduced Islam in China during the caliphate of Uthman ibn Affan. Husayn's forces were heavily outnumbered. Husayn had a grand total of about 150 soldiers, as some soldiers from the opposition had joined his side through his influence. The most prominent example of a person who joined Husayn's side through influence was a former soldier of Yazid called Hurr. Husayn's forces fought at least 5000 - 35000 of the enemy forces led by Umar ibn Sa'ad. Although, Husayn was given a chance to surrender himself and swear loyalty to Yazid but he refused to do so.
Husayn's army was split into 3 sections, the left flank, the right flank and the Ahl al-bayt. The Ahl al-bayt section consisted of the Banu Hashim, i.e., the clan of Hashim. The Ahl al-Bayt, in that context, referred to anyone who was from the family of Muhammad, either from himself or his cousins. Ahl al-Bayt means People of the House in Arabic. Habib was given the duty of being in charge of the left flank of Husayn's army, despite the fact that he was 70 years old. It is said in the book 'Karbala and Ashura', by Ali Husayn Jalali, that Habib killed 62 of the enemy soldiers before being taken as captive by enemy forces and later on decapitated by a commander in the enemy forces called Shimr ibn Dhil-Jawshan.The Shia hold the belief that: it is not unusual for a man of who is 70 years old to kill 62 soldiers, if his faith (iman) mounts to a very high level.