McCarthy rarely used facts. He first became known by saying he had a list of known communists in the State Department, but never revealed who those people were, and the number of communists supposedly on the list varied each time he mentioned it.
There were certainly some communists in the State Department – Alger Hiss almost certainly was – but not any great number, and many of those were people who joined the party at one point and then quit.
Also, I don’t believe it was illegal to be a communist in any case (the laws banning it came a bit later, and were declared unconstitutional on obvious First Amendment grounds).
As far as McCarthy’s commitment, a few months before the speech, McCarthy lunched with several senators, saying he needed an issue for reelection. One suggested the St. Lawrence Seaway, but McCarthy decided that wasn’t a big enough issue. A second senator suggested anticommunism, and Joe seemed to like the idea (Richard Rovere, Tail Gunner Joe, a not entirely unsympathetic account).
Ultimately, McCarthy uncovered a handful of communists, but caused many more loyal Americans to lose their jobs simply because they fell under suspcion.