Eight other people were injured and rescue teams continued to search for survivors under the rubble, said Assistant Interior Minister Abdel-Aziz Tawfeeq. Military police from a nearby naval base formed a security ring around the site to the rescue operation.
The building collapse came a day after 19 police conscripts were killed when the last car of a train they were riding jumped the tracks and smashed into another train just outside Cairo.
It was not immediately known what caused the building to collapse in a poor district of Alexandria, but violations of building specifications have been blamed for similar accidents in the past. The governor of Alexandria, Mohammed Abbas Atta, told Egypt's official news agency that the building was constructed without a permit.
Abul Ezz el-Hariri, an opposition lawmaker from Alexandria, warned that hundreds of buildings in the city face the same fate, but that lax law enforcement following the ouster two years ago of Egyptian leader Hosni Mubarak means that no action is being taken against building violations.
Residents complain that landowners in farmlands on the city's outskirts have taken advantage of the chaos and near lawlessness that followed the former president's overthrow and illegally sold their land to developers who built shoddy apartment blocks. Similar violations have taken place across much of the country during the same period.
Alexandria's security chief Abdel-Mawgood Lutfi said the building was constructed five years ago and had 24 apartments.
That the building collapsed early in the day meant that most tenants were home. Police evacuated residents of two adjacent buildings out of concern that the collapse may have caused structural damage to them.
The collapse is likely to fuel a popular outcry against the administration of President Mohammed Morsi, whose critics say he has failed to carry out reforms and overhaul the nation's deteriorating public services.
Two months ago, 50 children died when a train rammed into their school bus in southern Egypt. That tragedy also sparked a storm of criticism of Morsi, who took office in June.
The train wreck led to protests on Tuesday at train stations in Cairo, Alexandria and a third city in the Nile Delta. The demonstrators were protesting what they said was official negligence in maintaining and upgrading the country's aging rail network.
Morsi's government has blamed Tuesday's train accident on what officials say is nearly 30 years of corruption and misrule under Mubarak.