Independent board members of CBS Corp. are negotiating a possible exit for Chief Executive Leslie Moonves and asking for assurances of autonomy from controlling shareholder National Amusements Inc., people familiar with the matter said.

The fast-moving talks come as CBS and National Amusements, led by Shari Redstone, are trying to settle a legal dispute over control of the media company that is scheduled for trial in Delaware next month.

If terms can be reached on an exit for Mr. Moonves, CBS Chief Operating Officer Joe Ianniello would become interim chief executive while a search for a permanent replacement is launched, the people said.

Mr. Moonves is being investigated by law firms appointed by CBS’s board over sexual-harassment allegations reported by the New Yorker. His relationship with Ms. Redstone has become antagonistic over the past year as the two have battled over her desire to merge CBS and Viacom Inc.

One of the key issues in the talks, one of the people familiar with the matter said, are the terms of the Redstone family trust, which limit the ability of CBS and corporate sibling Viacom to be sold to a large buyer after the death of Ms. Redstone’s father, 95-year-old Sumner Redstone. National Amusements has said the trust can be amended.