TL;DR
The legal questions are really just a subset of the premise that this is fundamentally a business decision, albeit a highly political one. Determining whether or not to kill a project, and who should be assigned to a trouibled or failed project, is primarily a business decision with potential consequences (good or bad) to all parties regardless of the decisions made.
Legal questions are for the company's lawyers to answer. Business decisions are management's to make. Personal and professional choices belong to the project manager.
The PM's Viewpoint
From the incumbent project manager's point of view, it sounds like this project has already failed. Whether or not it is in the project manager's personal best interests to stay on a failed project really depends on individual circumstances and personal/professional goals. Some examples for consideration that might lead to staying include:
- The need to collect a paycheck.
- Whether the PM can salvage any positive career objectives (e.g. a positive reference) by "going down with the ship."
- The political ramifications of voluntarily leaving a project.
- The expectation of a post-project future with the current company.
The Business Viewpoint
Ultimately, whether the current PM should remain on a failed project is business decision. If the PM is blamed (rightly or wrongly) for the project's failure, the business could decide:
- It's the incumbent PM's job to "stay and clean up the mess."
- There is no one else to fill the role, so the current PM might as well continue the death march.
- The PM is at fault and should be removed from the project.
- Something else altogether.
The real question is whether the project can be salvaged. Again, that is a decision for the project's backers to decide. Sometimes earned value can be extracted from a project that isn't going to meet all of its original goals, and sometimes a project can't be saved even when additional time, money, or other resources are thrown at it. In the latter case, it often makes more sense for the business to cut its losses.