United Nations Secretary General Antonio Guterres speaks ahead of the G20 Summit in Bali, Indonesia, Monday, Nov. 14, 2022. AP
The UN chief, addressing reporters in Bali ahead of a Group of 20 summit, said that talks over the last week had delivered "a lot of progress" on the deal that is set to end on Saturday.
"I am hopeful that the Black Sea grain initiative will be renewed," Guterres said.
Ukraine is one of the world's top grain producers, and the Russian invasion had blocked 20 million tonnes of grain in its ports until the United Nations and Turkey brokered the deal in July.
"We need urgent action to prevent famine and hunger in a growing number of places around the world," Guterres said.
"The Black Sea grain initiative, and efforts to ensure Russian food and fertilisers can flow to global markets, are essential to global food security."
Russia has said it had yet to decide whether to extend the grain deal beyond November 19, the original date in the agreement.
The G7 bloc of industrial democracies has urged a renewal, with the war still raging in Ukraine nine months after Russia's invasion.
Moscow has complained that a second agreement brokered by the UN and Turkey on its fertilisers being exempt from sanctions had not been respected.
Russian Foreign Minister Sergei Lavrov will head Moscow's delegation at the Bali summit, replacing President Vladimir Putin.
On a separate issue to be addressed by the G20, Guterres took aim at global technology firms that he said have allowed their platforms to be used for human rights and privacy abuses.
He called for "global guardrails" to defend an open and free internet for all.
"Powerful tech companies are running roughshod over human rights and personal privacy and providing platforms for deadly disinformation, in pursuit of profits," he said.