The attack occurred in the al-Badrasheen area of Giza province, 30km (20 miles) south of Cairo, according to the Interior Ministry.
Two officers and three conscripts were killed in the attack.
No group has yet claimed responsibility but Egyptian forces have been battling Islamic State insurgents in the northern Sinai region. Islamic State (IS, formerly ISIS/ISIL) claimed responsibility for multiple attacks against Coptic Christians in Egypt this year as part of their North Sinai offensive.
However, the emerging Hasm group, aligned with the banned Muslim Brotherhood, has carried out similar attacks in recent months, including the murder of a security officer outside his home in Qalubiya province, near Cairo, on July 7.
General Hisham, the director of security for the Giza province, visited the scene of the attack according to Al Ahram News.