The attack took place on the desert road between Cairo and Ismailiya when the assailants in a car without number plates opened fire, said the official.
He said one soldier died instantly and the other succumbed to his wounds in hospital, adding that the army closed the road briefly after the incident.
On September 24 a policeman was killed and two others wounded in a similar attack on their vehicle near Ismailiya.
More than 100 policemen have been killed across Egypt in attacks and clashes since Morsi's ouster.
