The secretary-general hugged several relatives of the victims of the bombing during a ceremony at United Nations House and praised “the extraordinary fortitude and determination” of the survivors.
“Our fallen colleagues and partners will be remembered this morning with a moment of silence in many places,” he said.
“But nowhere are the memories of these colleagues more immediate, more vivid and more compelling than here in Abuja. We will remember them forever as truly the best of humanity.”
At least 21 people died when a bomb-laden car exploded at UN House, the headquarters for around 400 employees on August 26, 2011.
The death toll rose to 24 in the months that followed, according to the United Nations, with 12 non-UN staff among the victims.
The radical Islamist sect Boko Haram, blamed for the deaths of at least 15,000 people during a six-year-insurgency, mainly in Nigeria’s Northeast, claimed responsibility for the attack.
Ban arrived in Abuja on Sunday for a two-day visit during which he is due to hold talks with Nigeria’s President Muhammadu Buhari, with violent extremism high on the agenda, as well as development and climate change.
The secretary-general will stop over in France on his return trip to discuss preparations for a major climate change conference to be held in Paris at the end of the year.