McCarthy was right that academia, media, and all kinds of leftist groups were infested with Soviet assets to an alarming degree.
(We know he was right, and often suspected exactly the correct individuals, thanks to later-declassified Soviet docs.)
But then McCarthy went overboard and became obsessed with the idea that the military leadership, too, was completely infiltrated... Even though it wasn't.
It's like a form of Cassandra's curse - he was too right too often, and had to work too hard to get others to care, and it eventually turned him crazy. So other Republicans had to tard-wrangle him, and McCarthyism became a slur.
Still, overall, he did the nation a great service (before he turned crazy).