Ahmed Mansour Qurani Ali was given the shocking sentence for crimes which would have happened before his second birthday.
Now military spokesman Col Mohammed Samir said the court should have sentenced a 16-year-old with a similar name instead.
It not clear what will now happen to the four-year-old boy.
Despite his young age Ali was accused of committing four murders, attempting another eight, threatening police officers and vandalising property.
His defence attorney, Faisal al-Sayd, said the child’s name had been added to the list by mistake but the court did not pass the boy’s birth certificate on to the judge to prove he was born in September 2012.
At the time he said: “The child”s birth certificate was presented after state security forces added his name to the list of accused, but then the case was transferred to the military court and the child was sentenced in absentia in an ensuing court hearing.
“This proves that the judge did not read the case.”
Ali was subsequently convicted of four counts of murder, eight counts of attempted murder and vandalising government property.
The child was not in court when he was convicted and he was one of 115 defendants who were all handed life sentences at the same time at the court in western Cairo.
Since Mohammed Morsi”s elected government was ousted in 2013, Egypt has been ruled by a military dictatorship under President Abdel Fatah al-Sisi.
Around 40,000 opposition supporters are currently in jail as the government cracks down on dissent.