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.
Islamist militants have killed scores of policemen and soldiers, mostly in the Sinai Peninsula, since the army overthrew Islamist president Mohamed Morsi in 2013.
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 Islamist protesters, which has killed hundreds and left thousands in prison since Morsi's overthrow.
The Egyptian military has struggled to quell the IS jihadists 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.
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.
Editor: Ade P Marboen
Copyright © ANTARA 2015