The announcement follows weeks of high-profile defections from his government to the opposition, the Australian Broadcasting Corporation reports.
On Friday, one of O'Neill's key coalition allies abandoned him and the Opposition bloc then claimed it had 62 MPs in its camp, which would give it a majority in parliament.
The resignation will be formalised when O'Neill visits the Governor-General.
Earlier this month, he resisted a leadership challenge by adjourning parliament for three weeks ahead of a planned vote of no confidence in him.
Despite insisting it would have a majority, the opposition bloc that was trying to oust O'Neill fell short of the numbers. Having resisted calls to resign for weeks, O'Neill has now accepted that he no longer has the support to maintain his leadership.
Chan previously served as prime minister between 1980 and 1982 and from 1994 to 1997.
O'Neill was born in Southern Highlands Province. His father was Brian O'Neill, an Australian-born magistrate of Irish descent. His mother, Awambo Yari, a Papua New Guinean, came from the Southern Highlands.
According to Wikipedia, his father moved to Papua New Guinea in 1949 as an Australian government field officer and later serving as a magistrate in Goroka until his death in 1982.
Peter O'Neill spent his first years of his youth in his mother's village and entered his father's urban household after going to secondary school. O'Neill was educated at the Pangia Primary School, Ialibu High School and Goroka High School. After leaving school he obtained a BComm at the University of Papua New Guinea, followed by an honours degree in accountancy from UPNG.
In 2002, O'Neill entered parliament as MP for Ialibu-Pangia. He was re-elected in 2007, 2012 and 2017. This is remarkable as the turnover in the PNG parliament is high. Immediately after election in 2002 he became a Cabinet Minister for Labour and Industrial Relations in the government of Michael Somare.
In 2003 he was reassigned to the post of Minister for Public Service. However, in 2004 was dropped from the Cabinet. His party, the People's National Congress, left the government coalition. Thereafter O'Neill joined the Opposition. Amid fierce competition he became leader of the opposition in the same year.
O'Neill became prime minister in 2011 and won the subsequent elections of 2012. His PNC did well in the elections and obtained 27 seats while it had five seats in the previous parliament. It was the biggest in number of seats and therefore O'Neill was asked to form the government. However PNC was far from an absolute majority: it had less than a quarter of the seats in parliament and coalition building was thus required. A broad coalition appeared to support him: 94 votes in a 119 members parliament. This coalition contained three former prime ministers, among whom was Michael Somare. The latter thus supported him despite the previous bitter conflict. Somare had even threatened to throw O'Neill in jail if Somare would win the election.
O'Neill completed the full five year period of the parliamentary life from 2012-2017. There was ample opposition against him in the country, but he retained a firm grip on parliament.
Another forceful challenge was mounted in the 2017 PNG general election by another former prime minister, Mekere Morauta.