And a series of attacks the same day killed 17 more people, the latest in a surge in violence that Iraqi authorities have so far failed to stem.
Security and morgue officials said the unidentified men - aged 17 to 25 - had been shot in the head and chest. They had been dead for up to two days, an army source said.
The corpses were recovered close to a disused pharmaceuticals plant at Mahamel near the capital's eastern Shia district of Sadr City.
Summary executions were commonplace at the height of the Sunni-Shia conflict in 2006-2007, when many thousands died.
This was the first time in several years that such a large number of bodies had been found in one place.
The executions added to violence that has cost more than 4,200 lives this year, the highest toll since 2008, when Iraq was emerging from its brutal sectarian war.
The upsurge has raised fears of civil war.
Militants, including those linked to al Qaeda, have struck mosques, marketplaces and even football fields, and also carried out brazen assaults on two major prisons.
On Thursday, at least eight people were killed and 25 wounded by a bomb in a market in Abu Ghraib, west of Baghdad, officials said.
And other attacks, including six bombs that exploded near shops in an area south of Tikrit, killed nine more people, among them four soldiers.
The UN deputy special representative for Iraq, Gyorgy Busztin, has expressed "extreme concern" about a sectarian-based displacement of Sunni communities.
"The use of violence and intimidation against communities by illegal armed groups forcing them to flee their homes is unacceptable," he said on Wednesday.
Busztin called on the authorities "to protect communities from attack, ensuring their safety, security, and right to a peaceful life free of intimidation."
Prime Minister Nuri al-Maliki, who heads Iraq's Shia-majority government, condemned the trend as he met with displaced Sunni families.
He said al-Saadun clan members had been driven out of Nasiriyah, Basra and Kut, all Shia-majority regions in the south of the country.
A Western diplomat said "ethnic cleansing is taking place each day. There are more and more attacks aimed at widening the rift" between Iraqi communities."
In the port city of Basra, gunmen have shot dead 15 Sunnis since the start of the month, including a cleric and mosque employees, according to Abdulkarim al-Khazraji, a representative of the local Sunni community.
"Messages have been left in envelopes at night near Sunni mosques telling Sunnis to leave Basra" or face revenge attacks for violence against Shias in the northern city of Mosul.
"An eye for an eye, a tooth for a tooth," the messages warn, according to Khazraji, a religious leader.
He said some families had fled, despite assurances of protection by the authorities, and all prayer services in Sunni mosques have been suspended.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ