Joe McCarthy didn't "out" Alger Hiss as a traitor. That was Whitaker Chambers, an editor at Time magazine and a former member of the Communist underground. Richard Nixon, then a congressman, rode an investigation into Hiss' spying activities to fame and fortune, becoming a Senator about a year later.
As for McCarthy, seeing how the issue of Communism made Nixon into a big deal, started throwing around mostly-unsubstantiated charges of Commie Infiltration at the State Department (by the time that Chambers dropped the dime on Hiss, he had left the State Department and was working for the Carneigie Endowment). Along the way, as was pointed out a when the movie Good Night and Good Luck came out, he probably named a few people whose ties to the Communist Party deserved serious investigation, but by talking so much crap, those allegations got thrown out along with the nonsense. And all in the name of improving an utterly undistinguished political career.
Of course, the real villain here was the Republican Party, whose lust for the White House had become so insatiable that they would let a monster like McCarthy roam about spreading destruction for the sake of regaining it. Mind you, once Eisenhower was elected, he started chatting with his friend Bill Paley at CBS, who suddenly allowed Edward R. Murrow to go to work on McCarthy. About four years after Drew Pearson, at considerable risk to his career, had started catalouging McCarthy's misdeeds.