If an intellectual who publicly advocates for justice and claims to practice fair ethics commits a plainly unjust act (e.g. if it's a professor, sexual harassment and assault of a student), does that discredit the merits of his work?

I wager that most philosophers would say 'no.' In fact, the term "genetic fallacy" is used when someone seeks to discredit a view due to its origin (or genesis) and if you were to say some professor's philosophy lacks merit because he assaults a student, you would probably be told that you are making an ad hominem argument (an argument against the person and not what the person argues or believes). A classic case in the 20th century has been to condemn Heidegger's philosophy because he was (at least for a while) a Nazi. Still, if someone is unfair and unjust in their action, I suggest that is one reason to raise a question about whether the person has been unjust or unfair in his thinking or beliefs. If I fail to respect my students--important people whom I am supposed to respect and honor-- I think that would be a good reason to question whether I have respected and honored the very practice of philosophy.

It is also worth noting that there is a tradition in philosophy going back at least to Plato and Socrates, that a philosopher is a lover of wisdom, and so we should rightly expect philosophers to love wisdom in both their thinking and action. Philosophers in the Platonic tradition (the 17 century Cambridge Platonists, for example) would very much link action and thought.

A final point: Stepping back a bit, it might be worth observing that (sadly) someone might be profoundly just and fair with others rescuing students and others from assaults and yet be completely muddled in their philosophy!

Well, one more point actually: if your question stems from your awareness of an actual case of assault or harassment, I hope you will be able to report this in order for there to be a proper intervention.

Read another response by Charles Taliaferro
Read another response about Justice