Two of the five were injured in a gunbattle which broke out after security forces surrounded a building in the al-Rawdah suburb.
The Yemeni forces were reportedly acting on a tip-off.
The authorities have recently been working to try to strengthen security in Yemen in coordination with the United States, which believes al-Qaeda members are hiding in there.
American military trainers and investigators have been sent to Yemen since the 11 September attacks.
Djibouti build-up
Yemen says it is currently holding about 200 people it believes may have links to militant organisations.
Earlier this week, US defence officials confirmed that hundreds of US troops were in Djibouti, across the Gulf of Aden from Yemen.
However the Pentagon declined to comment on reports that they were preparing to move into Yemen to join the hunt for militant suspects.
Security in Yemen become a major US concern following an attack nearly two years ago on an American warship in the port of Aden which killed 17 US servicemen.
Last week, the authorities in New York state arrested six US men of of Yemeni descent suspected of belonging to an al-Qaeda cell.
Another Yemeni, Ramzi Binalshibh - allegedly a senior al-Qaeda figure - was arrested in Pakistan last week and is being questioned by US investigators.