The blast came as Nigerians were preparing to watch their country's Super Eagles play Argentina at the World Cup in Brazil. Many shops at the mall have TV screens but it was unclear if the explosion was timed to coincide with the match, which started an hour later.
Witnesses said victims were found around the exit to Emab Plaza, in Abuja's upscale Wuse 2 suburb. All spoke on condition of anonymity for fear of reprisals.
Billows of black smoke could be seen from a mile (kilometer) away.
"I heard the explosion and (felt) the building shaking," said Shuaibu Baba, who had a narrow escape. He said he rushed downstairs to find that the driver who had dropped him a few minutes earlier was dead. "I asked the driver to come with me, and he said 'No,' he would wait for me in the car."
Police Superintendent Frank Mba said 17 people were wounded and 21 bodies were recovered.
He also said one suspect has been arrested and investigations have already started.
The government urged calm and said it is doing everything possible to "to check the activities of insurgents."
One witness said he thought the bomb was dropped at the entrance to the mall by a motorcyclist, but Mba said it was too early to say.
It is the latest in a series of violent attacks blamed on Islamic extremists. Nigerian security forces appear incapable of curtailing the near-daily attacks concentrated in the northeast, where Boko Haram extremists have their stronghold.
Abuja is in the center of Nigeria and the militants have spread their attacks to the capital. Two separate explosions in Abuja in April killed more than 120 people and wounded about 200 at a busy bus station. Both were claimed by Boko Haram, which has threatened further attacks.
A bomb at a medical college in northern Kano killed at least eight people on Monday. Last week, at least 14 died in a bomb blast at a World Cup viewing site in Damaturu, a state capital in the northeast. In May, twin car bombs in the central city of Jos left more than 130 people dead; and a car bomb at a bus station killed 24 people in the Christian quarter of Kano, a Muslim city.
Boko Haram attracted international condemnation for the April mass abductions of more than 200 schoolgirls, and is blamed for this week's abductions of another 91 people — 31 boys and 60 girls and women with toddlers as young as 3.
Nigeria's military and government claim to be winning the war in the 5-year-old insurgency but the tempo and deadliness of attacks has increased this year, killing more than 2,000 people so far compared to an estimated 3,600 killed over the past four years.
Abuja residents were urged "to remain calm and go about their normal business," by government spokesman Mike Omeri who issued a statement saying that security agencies are "handling the situation."
He said that "every step is being taken by the government to check the activities of insurgents in the country and advised Nigerians to remain vigilant and conscious of movement of unidentified people."
Boko Haram wants to install an Islamic state in Nigeria, a West African nation whose 170 million people are almost equally divided between Muslims who are dominant in the north and Christians in the south.