"A suicide bomber blew himself up in Musayyib market, causing 20 civilian martyrs," an interior ministry spokesman said.
At least 34 other people were wounded in the attack in the centre of Musayyib, a town that lies about 60 kilometres (35 miles) south of the capital, a police officer and a medic at the local hospital said.
A source at Musayyib hospital said at least four of the wounded were in very serious condition following the blast, which rocked the market at around 11:30 am (0830 GMT).
The attack in Musayyib came hours after another, apparently failed attack in the Shiite shrine city of Karbala, a few kilometres (couple of miles) to the southwest.
Four civilians were wounded when a suicide bomber blew himself up at the entrance of the city's main bus station early Friday, police sources said.
Both attacks were claimed by ISIS through its propaganda agency Amaq, which in both cases spoke of a "martyrdom-seeking operation" using an explosive vest.
ISIS has carried out dozens of deadly suicide bombings targeting civilians but Iraq has been on heightened alert since the start of the holy Muslim fasting month of Ramadan.
More than 40 people were killed and dozens wounded in a spate of attacks on May 30, a few days after the beginning of Ramadan, including a devastating blast at an ice cream shop in central Baghdad's Karrada neighbourhood.
It was during Ramadan last year that ISIS carried out its deadliest ever attack in the Iraqi capital with a truck bomb that set two shopping arcades ablaze, also in Karrada, resulting in more than 320 deaths.
The bombings in Baghdad come as Iraqi forces fight to retake the last ISIS-held areas of Mosul, a city that was the jihadist group's emblematic stronghold.
Iraqi forces are almost eight months into a massive operation to recapture the second city and have already taken back its whole eastern side and much of the west.