A day after being eliminated from playoff contention, the slumping Mariners snapped Oakland's season-high seven-game winning streak and its eight-game run at home - the team's second-longest in 11 years.
The Mariners had lost eight of nine.
Hernandez (6-5) gave up one run in six innings of two-hit ball. King Felix hadn't won since July 15, a stretch that included a stint on the disabled list from Aug. 2 to Sept. 13 with right shoulder bursitis. He was 0-2 with a 5.40 ERA in his previous five starts.
Haniger hit his 15th and 16th home runs off starter Daniel Gossett (4-10). The 24-year-old Oakland rookie gave up seven runs on a career-high four homers allowed.
Marcus Semien hit a solo homer off Hernandez in the sixth.
Andrew Albers pitched three shutout innings for his first save.
MAXWELL IN THE LINEUP:
A's catcher Bruce Maxwell played his first game since becoming the first player in the majors to kneel during the national anthem Saturday, part of a national protest movement against discrimination and harsh treatment of blacks by police. He was greeted with a loud ovation along with some boos sprinkled in from the Oakland crowd of 9,329. Maxwell cleared the concussion protocol on Monday. He hadn't played since Sept. 20.
SHOW OF SUPPORT:
In an apparent show of support for Maxwell, most of the Oakland Unified School District band members took a knee as they performed the national anthem before the game.
The 31-year-old Hernandez became the fifth active pitcher to log more than 2,500 career innings.
Mariners: INF Jean Segura (sprained right middle finger) will likely miss the remainder of the series, manager Scott Servais said. "He wants to get in there before the season's over. It's important to him, but he's not going to be available for a couple of days," Servais said.
Athletics: 1B Matt Olson was scheduled to have an MRI to determine the severity of a hamstring injury he sustained Sunday. The 23-year-old rookie will miss the rest of the series, manager Bob Melvin said. Olson has 25 home runs in 189 at-bats. "We're hoping we can get him back in Texas, but I'm not so sure about that," Melvin said. ... LHP Sean Manaea, who missed his last scheduled start on Saturday with upper back tightness, threw a bullpen and is on track to make his next start Thursday, Melvin said.
Mariners: LHP James Paxton (12-5, 3.03 ERA) is 0-2 with a 9.00 ERA in two starts since coming off the DL on Sept. 14. He had been sidelined with a strained left pectoral muscle. Paxton is 3-0 with a 3.77 ERA in five career starts against Oakland.
Athletics: RHP Daniel Mengden (2-1, 3.30) is 2-0 with a 0.82 ERA in his last three starts. Mengden took the loss in his only career start against Seattle last season. He struck out six and gave up two runs on five hits and two walks in five innings.