Hernandez (10-5) retired 13 of 14 New York batters through the middle innings as well as the last seven he faced in the dominating performance, allowing only one runner as far as second base.
The right-hander issued a pair of walks and struck out six in racking up his seventh career shutout, lowering his ERA to 2.63.
Mike Carp drove in John Jaso with a second-inning single for the contest's only run as the Mariners evened their three-game series.
Hiroki Kuroda (10-8) absorbed the hard-luck loss, yielding only the one run on seven hits over 6 1/3 frames. The right-hander walked one and struck out four.
Millions of Getty images now available for free via embed tool
Ray Liotta sues skin care company over use of likeness