Beating their heads and chests, crowds of pilgrims lurched and swerved to try to touch a mock coffin being carried to the shrine in the northern neighbourhood of Kadhimiyah.
"This visit means a lot to us, it is about showing respect for the suffering of the imam and the injustice he faced and about reaffirming our dedication to him," said Ahmad Jamal, a 28-year-old civil servant in the crowd of pilgrims.
Imam Kadhim, the seventh of 12 revered imams of Shias, died in 799 AD. The commemoration has in recent years turned into a huge event that brings the Iraqi capital to a standstill for days.
Shiite religious events and sites are considered prime potential targets for suicide attacks by the ISIS and huge security deployments were visible across Baghdad.
Many of the main thoroughfares have been blocked to traffic for days to minimise the risk of car bombs and allow the pilgrims to reach the shrine. Some of them walk several days, mostly from southern Iraq.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.