The five-time Cy Young Award winner limited his former team to three hits in seven innings, leading the Yankees to a 2-0 victory over Hernandez and the Seattle Mariners on Wednesday night.
"I'm here to win," Johnson said. "No doubt, it's been a disappointing year, but I know what I'm capable of doing. I think the game that I pitched today was coming."
Johnson (13-8) won his second straight start as the Yankees remained 2½ games behind the Boston Red Sox in the AL East. New York is a game ahead of the Los Angeles Angels in the wild-card race.
"I don't get worked up against who I'm pitching against," Johnson said of the highly touted Hernandez.
But Yankees manager Joe Torre emphasized Johnson rose to the occasion and wanted to have a big game.
"Randy was certainly equal to the task," Torre said. "He just dominated tonight. There's been a lot of talk about Hernandez all week and the changing of the guard."
Seattle manager Mike Hargrove saluted Johnson's performance.
"That's the best I've seen him in a long time," Hargrove said. "He is awfully good anyway, but he was right on top of his game tonight."
Hernandez (2-2) was nearly as good, but allowed homers to rookie Robinson Cano and Gary Sheffield. Hernandez said he threw a fastball to Sheffield for the second homer and a changeup to Cano for the first.
"It was two pitches and two runs and two mistakes," he said through a translator.
In only his second start at Safeco Field, the Big Unit had one of the best games of his up-and-down first season with the Yankees. He struck out seven and walked two, lowering his ERA to 4.09, in his 28th start before being replaced by Tom Gordon at the start of the eighth.
Johnson pitched for the Mariners from 1989-98, winning his first Cy Young Award with them in 1995.
Yankees catcher John Flaherty said fans in New York are starting to see vintage Johnson, who will turn 42 on Sept. 10.
"I think you're seeing the Randy Johnson attitude that we've been waiting to see," he said. "It was a great night for him."
Mariners slugger Richie Sexson said he thought Johnson wanted to shine again in Seattle.
"He's intense," Sexson said. "Back in the old city again, I'm sure that played a role."
Mariano Rivera finished the four-hitter, earning his second save of the series and his 35th in 39 opportunities.
Hernandez, who has a 98 mph fastball, pitched eight innings, giving up two runs on four hits and four walks, with seven strikeouts. It was his sixth start for Seattle.
Cano gave the Yankees a 1-0 lead in the third when he homered to right, his ninth of the season.
In the fourth, Sheffield hit his 28th homer, the 443rd of his career. He moved into sole possession of 30th place on the all-time list, ahead of Dave Kingman.
Ichiro Suzuki moved Betancourt to third with a groundout, but Johnson got Jamal Strong on a called third strike on a 96 mph fastball and induced Raul Ibanez to ground out to end the inning -- after first baseman Tino Martinez gave Ibanez another chance when he dropped a foul popup for an error.
Adrian Beltre got an infield hit and Jose Lopez singled to center for the Mariners with one out in the seventh, but Johnson got Mike Morse to fly out, moving Beltre to third, and then got Yorvit Torrealba to hit into a fielder's choice to end the inning.
Playing with a tight right groin, third baseman Alex Rodriguez turned in the game's best defensive play in the third. He backhanded Suzuki's hard grounder and made a jump throw from about 10 feet in foul territory to get the speedy Suzuki at first.
"I got tested a little bit," Rodriguez said. "I'm still a little sore."
- The Yankees got their 10th shutout and the Mariners were shut out for the fifth time this season. The Yankees tied Oakland for the most shutouts in the American League.
- The Mariners had their sixth sellout crowd of the season.
- Four Mariners players faced Johnson for the first time; Lopez, Morse, Strong and Betancourt.
- Bernie Williams pinch hit for Martinez in the ninth after the first baseman strained his ribcage after taking a swing. "We'll see how it is tomorrow," Martinez said.
- In two starts against the Mariners at Safeco, Johnson is 2-0 and hasn't allowed a run in 16 innings, with 11 hits, three walks and 17 strikeouts.