Rockets hit Kyiv during the UN Secretary General’s visit to the city, in which he criticised his own organisation’s Security Council.
Antonio Guterres said the council had failed to prevent or end the war in Ukraine.
This was “a source of great disappointment, frustration and anger,” he said.
“Let me be very clear: [it] failed to do everything in its power to prevent and end this war,” he added.
The 15-member UN Security Council is specifically tasked with ensuring global peace and security.
But it has faced criticism, including from Ukraine’s government, for failing to act since the invasion began in February.
Russia is one of five permanent members of the body and it has vetoed more than one resolution on the conflict.
Mr Guterres was speaking on Thursday evening at a joint news conference with Ukrainian President Volodymyr Zelensky, who has previously criticised the Security Council.
“I am here to say to you Mr President, and to the people of Ukraine, we will not give up,” he said.
But Mr Guterres also defended his organisation, admitting that while the Security Council had been “paralysed” the UN was taking other actions.
“The UN is the 1,400 staff members in Ukraine who are working to provide assistance, food, cash [and] other forms of support,” he told the BBC.
At Thursday’s briefing, President Zelensky said Mr Guterres had a chance to witness first-hand “all the war crimes” committed by Russia in Ukraine.
The Ukrainian leader again described Russia’s actions in his country as “genocide”.
During the UN chief’s visit, two blasts hit the central Shevchenko district of Kyiv, with three people taken to hospital with injuries, according to the city’s mayor.
Mr Guterres also visited several sites where Ukraine accuses Russia of committing war crimes. Moscow denies the accusation.
In the town of Borodyanka, north-west of Kyiv, Mr Guterres spoke to reporters in front of buildings that had been destroyed by strikes and shelling.
He said the site made him imagine what it would be like for his own family, calling the war in Ukraine an “absurdity in the 21st Century.”
And Mr Guterres made a passionate plea to save thousands of people in Ukraine’s southern city of Mariupol, which has been virtually destroyed by weeks of heavy Russian bombardment.
“Mariupol is a crisis within a crisis,” he said. “Thousands of civilians need life-saving assistance, many are elderly and in need of medical care, or have limited mobility. They need an escape route out of the apocalypse.”
Russia has so far denied repeated requests by Kyiv to allow the last Ukrainian defenders and civilians trapped in the Azovstal industrial area to be evacuated.
But Mr Guterres later told the BBC that Russia’s President Vladimir Putin had agreed “in principle” to allow civilians to evacuate the city.
Previous evacuation attempts have stalled and local officials have blamed Russian shelling.