Suppose Researcher A did some joint work with Researcher B. While the work was still in progress, or the manuscript was in preparation, researcher B became persona non grata in Academia, due to wrongdoing. I don't think the exact nature of wrongdoing is relevant here, but let's say it is serious, as in for example:
- faking research results (the research with A was not faked)
- severely breaching research ethics (the research with A was not affected)
- sexual misconduct towards subordinates (that Researcher A was not aware of during joint work)
What's Researcher A to do? I see four options, all of which have their ethical and practical drawbacks.
- publish the result jointly with B as planned. The ethical drawback is that it can be perceived as siding with B in the scandal/breaching a boycott, and the practical one is that Researcher A's career might suffer from association with the scandal.
- not publish at all. The practical drawback is that Researcher's A CV suffers, and the ethical drawbacks are obvious: not publishing a worthy research funded by taxpayers is a waste of their money; it may hinder further progress of the field, and, for example, in Maths, if results have been announced or communicated to the community, then codes of conduct explicitly require that the details are published soon.
- withdraw Researcher A's name. The practical drawback is as above, and the ethical drawback is that generally nobody should receive full credit for the work that was in fact joint, and even less so as a "reward" for the misconduct.
- ask/pressure Researcher B to withdraw their name. The practical concern is that Researcher B may not agree, and the ethical one is that, again, Researcher A should not get more credit than their contribution to the work, and wrongdoing should not disqualify B from getting their share of credit where it is due.
So, what is the right course of action for A, ethically and practically?
faking research results (the research with A was not faked)
at least in some fields it would be very hard to say this confidently. And you would need to be extremely confident that you are correct in your assumption -- if you went ahead and published with someone you knew to be deceitful in some of their work , even a minor problem with your paper is going to make you look very bad.