The gunmen opened fire on a police vehicle, killing those inside, in an area between the famed Giza pyramids west of Cairo and the Saqarra pyramids to the south, the ministry said in a statement.
The attackers' affiliation was not immediately clear.
Militants have killed scores of policemen and soldiers, mostly in the Sinai Peninsula, since the army overthrew president Mohamed Morsi in 2013.
At least 3 Egypt police killed in Sinai bombing: state TV
Attacks have also targeted policemen and government buildings in the capital, several of them claimed by an Islamic State group affiliate.
The extremists often claim that their attacks are retaliation for a police crackdown on protesters, which has killed hundreds and left thousands in prison since Morsi's overthrow.
The Egyptian military has struggled to quell the IS militants in Sinai, who claimed responsibility for bombing a Russian passenger plane on October 31 over the peninsula, killing all 224 people on board.
But the militants have suffered more losses in Cairo, with police repeatedly killing or arresting cells in the capital.
Eight civilians killed in Egypt's Sinai
The interior ministry announced earlier this month the killing of a top IS operative in Cairo suspected of involvement in the abduction and execution of a Croatian oil worker, and the bombing of the Italian consulate.
Ashraf Ali Ali Hassanein al-Gharabli died in a hail of bullets after he opened fire on policemen who tried to arrest him in the north of the capital, the ministry had said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ