Three others were acquitted in the case.
Special judge H C Vora convicted Farooq Bhana and Imran Sheru and awarded them life sentence after the prosecution established their role as conspirators in the burning of two coaches of the Sabarmati Express in 2002.
The court acquitted three others, identified as Hussain Suleman Mohan, Kasam Bhamedi and Faruk Dhantiya.
These five men were apprehended in 2015-2016 and the trial was held at a special court set up at the Sabarmati Central Jail in Ahmedabad.
Mohan was arrested from Jhabua in Madhya Pradesh, Bhamedi from Dahod railway station in Gujarat, Dhantiya and Bhana were nabbed from their houses at Godhra in Gujarat, while Bhatuk was caught at Malegaon in Maharashtra.
Eight accused in the case are still absconding.
Earlier, the special SIT court had convicted 31 people in the case on March 1, 2011.
The court had later awarded death sentence to 11 of them and life imprisonment to 20 others.
However, the Gujarat high court had in October 2017 commuted the death sentence of 11 convicts to life imprisonment while upholding the punishment awarded by the special SIT court to 20 others.
59 'kar sevaks' were killed in the Godhra train burning incident of February 27, 2002, triggering the worst communal riots in the history of Gujarat in which over 1,000 people, mostly belonging to the minority community, were killed.
'Satyamev Jayete', Modi tweets after relief in Gujarat riots case
THE MODI INTERVIEW: I won't apologise for 2002 riots
Godhra train carnage case chronology
READ: Narendra Modi's blog post on 2002 Gujarat riots