Ahmed al-Khafaji, a commander in the Shiite Badr militia, was killed in the attack in the Kadhimiyah area of Baghdad, a fellow lawmaker and a medical official said.
The bombing, which wounded at least another 51 people, was the third in the Shiite district of Kadhimiyah in four days.
In a statement posted online, the Islamic State group (IS) said that a suicide bomber it identified as Abu Aisha al-Samarraie had carried out the attack and that Khafaji was the target.
"We have confirmed that he was killed, although it is not yet entirely clear whether he was the target of the attack," the MP told AFP.
More From This Section
A medical official also said Khafaji was among the 21 people killed in the explosion.
Khafaji was a member of the main Shiite bloc in parliament, the State of Law coalition, of which Prime Minister Haidar al-Abadi's Dawa party is also part.
But he was best known as a top leader of the Badr organisation, which is one of the main Shiite militias in Iraq and has close ties to Iran.
The Badr organisation was created in the 1980s with Tehran's backing to fight the regime of executed former president Saddam Hussein.
It is currently headed by Hadi al-Ameri, a former transport minister whose declared candidacy for the as-yet-unfilled interior and defence portfolios has raised concern at home and abroad.
Badr plays a frontline role in Baghdad's military efforts to fight back against IS and try to reclaim some of the land lost when the jihadists launched a devastating offensive in June.
The organisation is one of the four main Shiite militias in the country.
While they have ranks of up to several tens of thousands of fighters and are integrated in government operations, they act outside the law.