The comments by Antonio Guterres late on Sunday came after security forces killed at least seven people and arrested more than 120 during protests against Kabila’s rule.
Catholic protesters rallied in the capital, Kinshasa, and other cities after Sunday mass to demand Kabila, whose second term as president ended in December 2016, step down.
A year ago, the president committed to holding an election to choose his successor by the end of 2017. That vote has now been delayed until December 23, 2018.
This has raised concerns that Kabila will try to remove constitutional term limits that forbid him to run again and extend his rule.
In a statement, Guterres urged all Congo “political actors to remain fully committed to the 31 December 2016 political agreement, which remains the only viable path to the holding of elections, the peaceful transfer of power and the consolidation of stability”.
The UN Secretary-General also called for restraint, urging security forces to “uphold the rights of the Congolese people to the freedom of speech and peaceful assembly”.
Kabila, in power since 2001, says he will stay in power until the December 2018 vote to account for delays in voter registration.
However, opposition leaders have called for Kabila to step down.
“We are telling everybody, all over the world, this guy has to go,” Martin Fayulu, an opposition leader, said on Sunday.
“This guy doesn’t like Congo. This guy has nothing to do with Congo and his time is up.”
During Sunday’s rallies, state police and military officials in Kinshasa “repressed peaceful protesters”, a coalition of human rights groups said, leading to deaths, injuries and the arbitrary arrests of individuals who joined the demonstrations.
Before the protests, internet and SMS services were shut down by the telecommunications ministry.