CBS Corp. (CBS - Get Report)  confirmed Sunday that longtime executive and CEO Les Moonves will resign after more than two decades with the broadcaster amid new allegations of sexual harassment and inappropriate conduct, but could still pocket more than $100 million if an investigation into the charges clears his name.

The company said that Moonves, 68, will donate around $20 million to "to one or more organizations that support the #MeToo movement and equality for women in the workplace"and that the money will be deduced from any severance he may or may not receive from his departure, based on an independent investigation into the allegations. In a filing with the U.S. Securities and Exchange Commission, CBS also said it would contribute $120 million to a guarantor trust fund within 30 days of its Sept. 9 agreement with Moonves, and will determine whether it has the right to terminate the former CEO with cause by Jan. 31, 2019.

"Untrue allegations from decades ago are now being made against me that are not consistent with who I am," Moonves said in a statement Sunday. "Effective immediately I will no longer be Chairman and Chief Executive Officer of CBS."

CBS shares fell 3% in the opening 30 minutes of trading to change hands at $54.36 each, a move that nonetheless leaves the stock down nearly 5% so far this year.

CBS also said David Andelman, Joe Califano, Chares Giddor, Leonard Goldberg, Arnold Kopelson and Doug Morris also left the company voluntarily. Joseph Ianniello, CBS' chief operating officer, will serve as interim CEO while a formal search for Moonves' replacement is conducted, CBS said.

The move to oust Moonves, who has held senior positions at CBS since 1995, followed new revelations in the Sunday edition of the New Yorker Magazine, which included allegations from six different women who claimed Moonves used physical intimidation and violence as part of a pattern of abusive sexual behaviour, all of which he denies. 

"CBS is an organization of talented and dedicated people who have created one of the most successful media companies in the world," said vice chairman Shari Redstone. "Today's resolution will benefit all shareholders, allowing us to focus on the business of running CBS - and transforming it for the future. We are confident in Joe's ability to serve as acting CEO and delighted to welcome our new directors, who bring valuable and diverse expertise and a strong commitment to corporate governance."

As part of the overall agreement to oust Moonves, National Amusements Inc., which controls both CBS and Viacom VIAB, said it would delay any push to merge the two groups for at least two years, although other entities or investors are free to do the same. National Amusements and its controlling owners, Shari Redstone and her father Sumner. Shari Redstone sits on the CBS board, along with National Amusements director David Andelman.

Moonves was first accused of making unwanted advances towards six women over period of 20 years starting in 1985 in an article published by the New Yorker magazine in late July, allegations that the long-serving CEO said he regrets "immensely" even as he insisted he never abused his position.

CBS said shortly afterwards that it would investigate the reports, which included allegations of harassment and gender discrimination by company executives from at least 30 other women but said the "picture of our Company created in The New Yorker represents a larger organization that does its best to treat its tens of thousands of employees with dignity and respect."