The train was travelling from Upper Egypt to Cairo when it derailed in the Giza neighbourhood of Badra-shin, a security source said, adding that the train was a military vehicle carrying conscripted youth on their way to an army camp.
The 103 injured passengers were taken to hospitals, the spokesman said.
Egypt's roads and railways have a poor safety record, and Egyptians have long complained that successive governments have failed to enforce even basic safeguards, leading to a string of deadly crashes.
In a demonstration at Cairo railway station about 200 protesters chanted: "Be happy Mubarak. Mursi is continuing in your tracks," referring to former president Hosni Mubarak who was ousted in an uprising in 2011.
Egyptian President Mohamed Mursi, elected in June 2012, visited accident victims at an army hospital in central Cairo.
He described the incident as a "disaster for all Egyptians" and vowed to punish those responsible, adding that the train driver had been detained pending investigations.