Policemen and soldiers have faced regular militant attacks since the army ousted Islamist president Mohamed Morsi in July 2013.
Hundreds have been killed in attacks claimed by jihadist groups in retaliation for a government crackdown targeting Morsi's supporters since his ouster.
Signup to our newsletter and follow us on Facebook and Twitter!
The gunmen opened fire on the two policemen while they patrolled in the city of Minya, about 250 kilometres (155 miles) south of Cairo, interior ministry spokesman Hani Abdel Latif told AFP.
The policemen were responsible for the security of a church in the city, a security official from Minya said, but Abdel Latif said the attack occurred far away from the church.
Minya was the scene of unrest last year when the Coptic Christian community faced several attacks from Islamists.