Several thousand riot police wielding batons and water cannon stormed the small square where the Sudanese had been camping out and forcibly broke up their protest, after failing to convince the refugees to end a three-month sit-in.
The Sudanese were protesting outside the UN offices in a bid to have their failed claims to refugee status reconsidered.
Kofi Annan expressed sorrow over the deaths, saying the violence “could not be justified”.
"The secretary general was deeply saddened to learn of the violent deaths of a number of Sudanese migrants in Cairo today as a result of clashes with police," Mr Annan said in a statement on Friday.
"Their deaths are a terrible tragedy that cannot be justified."
Mr Annan expressed "his profound regret that this situation was not resolved peacefully and through dialogue, as the United Nations High Commissioner for Refugees had strongly urged."
The Egyptian Interior Ministry said the deaths were caused by a stampede after riot police moved in.
There are about 30,000 registered Sudanese refugees in Egypt but some estimates put the migrant population at two million.
A civil war in neighboring Sudan ended a year ago after 21 years of bloodshed. The conflict displaced some four million people and an ongoing war in the western region of Darfur has also forced thousands to flee.
Authorities in the United States also expressed sorrow over the deaths.
"We are saddened by the death of Sudanese in Cairo today and we extend our condolences to the families of the victims and our sympathies to those who are injured," US State Department spokesman Adam Ereli told reporters.
"Our embassy in Egypt has been in touch with the Egyptian authorities and other relevant agencies to gather information on the situation," he added.
