Former UN Secretary-General Ban Ki-moon has said he will not run for South Korea's presidency, a surprise announcement that removes a key figure from the scramble to replace impeached President Park Geun-hye.

The withdrawal of Ban, who had been considered the only major conservative contender, boosts liberal Moon Jae-in, who has enjoyed a comfortable lead in opinion surveys since Park was impeached in December.

Ban told a hastily arranged news conference that he had wanted to use his 10 years of experience as UN chief to resolve a national crisis and achieve unity. But he said his "pure patriotism" and push for political reform were badly damaged by political slander and "fake news" that targeted him.

He did not elaborate, but Ban has faced growing media questions about his political competence and corruption allegations.

"I was also very disappointed by old-fashioned, narrow-minded egoistic attitudes by some politicians, and I came to a conclusion that it would be meaningless to work together with them," he said.

Politics in South Korea has been upended by a massive scandal involving Park and her confidant, which prompted millions to take to the streets in protest. Prosecutors accuse Park of letting her friend Choi Soon-sil pull government strings from the shadows and collude with her to extort money from businesses.

Park is on a trial at the Constitutional Court, which is deliberating over whether to confirm her impeachment or restore her to power. If she is thrown out, presidential elections, originally set for December, would be held within two months.

Ban, a former South Korean foreign minister whose service at the UN ended in December, initially generated sizable interest in his home country and was widely seen as testing the political waters for a possible candidacy.

But his approval ratings, which once outpaced Moon and other potential rivals, have been falling since the scandal flared in October. A survey released earlier Wednesday showed Moon, who lost the 2012 election to Park, had a 32.8 percent approval rating while Ban ranked second with 13.1 percent.

Ban is not the first UN official to face difficulty in turning to politics after leaving the world organisation.

Kurt Waldheim, who served as UN secretary-general in 1972-81, later became Austria's president but his UN legacy was overshadowed by revelations that he served in a German unit linked to atrocities in World War II. Mohammed El-Baradei, former head of the UN nuclear watchdog and a Nobel Peace Prize laureate, became a prominent critic of longtime autocrat Hosni Mubarak after his return home to Egypt. After Mubarak and his successor Mohammed Morsi were ousted, El-Baradei served as a vice president in the military-backed government in 2013, only to resign one month later in protest over a deadly government crackdown on Morsi supporters.

After his return to South Korea on 12 January, Ban conducted politically tinged tours of the country and met high-profile politicians. But he saw his popularity decline further as he struggled to defuse media criticism that he lacks details about how to pursue reforms, is vague about his political identity and showed a lack of experience.

One incident that caused Ban problems happened on 18 January when reporters repeatedly asked him about his past support for Park's contentious 2015 deal with Japan over Korean women forced to serve as sex slaves for wartime Japanese troops. Tired of the same question, Ban described journalists with an insulting Korean term that can be translated as "jerks." He later apologised for the comment.

Ban also repeatedly denied allegations in the media that he took bribes from a businessman at the centre of a corruption scandal that led to the suicide of former South Korean President Roh Moo-hyun in 2009. Moon, a former human rights lawyer, served as Roh's presidential chief of staff.

Ban was also forced to defend himself over criminal charges against two of his relatives, who have been indicted in the United States on charges of plotting to bribe a Middle East official to influence the $800 million sale of a building complex in Vietnam. Ban has said he knew nothing about the alleged criminal activities.

Meeting with reporters, Moon called Ban's decision "unexpected." Moon said he is willing to seek Ban's advice on international affairs, saying "Ban's experience in foreign policy and international politics should be actively used for our country."

Ban's exit left the conservatives with no main contender to compete against Moon. Possible conservative candidates could be interim leader and Prime Minister Hwang Kyo-ahn or Yoo Seong-min, one of the politicians who bolted Park's embattled ruling party.