My friend is too freaky

My male best friend is basically sexually harassing my female best friend and she obviously doesn't really like that. He's lowkey saying some absolutely vile things to her and about her, but I've been friends with him for 10 years and would prefer to make him stop over banishing him from the friend group for eternity. Simply put, he suddenly became a gooner for a girl who has told him to his face that she's not interested.

Any recommendations on what I should do? I've thought about it, but I can't decide for sure