The assailants, riding in two vehicles, opened fire on a security convoy on the main ring road in the Nasr City area.
No group has yet said it was behind the attack, which occurred on Monday night.
However, jihadist militants have killed hundreds of police and soldiers since the military overthrew Islamist President Mohammed Morsi in 2013.
Last month, President Abdul Fattah al-Sisi declared a state of emergency after at least 45 people were killed in suicide bomb attacks on two Coptic Christian churches in Tanta and Alexandria.
So-called Islamic State said a local affiliate had carried out the bombings.
Hours before Monday's attack, the UN high commissioner for human rights questioned the measures being taken by Egypt's government to combat jihadism.
Zeid Raad Al Hussein condemned April's church bombings, but told a news conference in Geneva that the "state of emergency, the massive number of detentions, reports of torture and continued arbitrary arrests - all of this we believe facilitates radicalisation in prisons", according to Reuters news agency.
"And abetted by the crackdown on civil society through travel bans, freezing orders, anti-protest laws, this is in our opinion is not the way to fight terror," he added.
"National security yes, must be a priority for every country, but again not at the expense of human rights."
Human rights activists say more than 1,000 people, most of them Morsi supporters, have been killed and tens of thousands arrested in the crackdown.

Ian "Jacko" Roberts, 54, of Acrefair, near Wrexham, was in Toulouse for the historic 3-0 win against Russia.
But on Monday, he will return to hospital for treatment on a tumour in his nasal passage.
He said of the game: "The atmosphere was amazing...exceptional."
The win means Wales qualified for the second round, with their next game to be played in Paris on Saturday.
And Mr Roberts, a father-of-one, said he got to meet former Wales international players turned pundits Robbie Savage and John Hartson, who has had cancer, at his hotel in Toulouse.
"I was having a bit of a talk to John Hartson and he was giving me the arm around the shoulder. It was really good," he added.
Two weeks ago Mr Roberts finished 12 sessions of chemotherapy and is about to begin radiation treatment.
The carpenter and joiner, who sings for Froncysyllte Male Voice Choir, was captured singing the national anthem by Hartson who tweeted the footage before the Russia game.
He said it had been brilliant watching the team in France, adding: "Especially after all the years where we have had the heartbreaks, all them times when we failed to qualify.
"It was actually the morning of the Andorra game [a Euro 2016 qualifier which Wales won 2-0 in October] I was told I had the tumour in the nasal passage.
"For all the winter I didn't know I was coming [to France] until the Wednesday before.
"And my friends have all got me tickets. They've all chipped in money for me to come because obviously I've been out of work for a while."
Mr Roberts said it has been hard travelling but he has had a great time with his friends, including Gareth Roberts, 55, originally of Bangor but now living in Chester.
Mr Roberts said he has met lots of footballers and stars through his singing but it is nice for his son, Thomas, 14, to see him mingling with such big names.
Suspected militants have killed three police officers and wounded five others in an attack in the Egyptian capital, Cairo, the interior ministry says.
[NEXT_CONCEPT]
A football fan who has taken a break from his cancer treatment to follow Wales in France in Euro 2016 said it has been "amazing".