If Failure is Assured, Fail Early
If a project has failed, and isn't salvageable from a business perspective, then it should be canceled. This is a cost control measure, and certainly one of the objectives of effective project management.
While it's better to identify at-risk projects early on in the process and take corrective action, once a project has actually failed it means that no further business value can be realized. At that point, why continue funding it?
Project Ownership
In Scrum, the Product Owner is responsible for terminating the project. In other methodologies, the responsible party may be the project sponsor, the steering committee, or whoever is specifically tasked with the decision in the project's charter.
Generally, the project manager is responsible for raising the visibility of risks and reporting project status. In many organizations, the project manager is also responsible for project-related financial projections, but this varies in my experience. However, unless the project charter gives you authority to terminate a project, then the best you can do is offer your honest professional opinion to those who actually have the authority to make (de)funding decisions.
Organizational Misperceptions
I've overheard people say that project management is "responsibility without authority." This stems from a common misperception of the role of project management. A good project manager is a shepherd of process, not a task master, overseer, or project guarantor.
That doesn't mean PMs aren't blamed when projects fail. Of course they are. However, that's a cultural and social issue within an organization, and part of a PMs job as a process coach is to educate and inform management and team members of the scope (and limits) of your role.