[5][6] On January 26, 2023, the Orioles traded Hernáiz to the Oakland Athletics in exchange for pitchers Kyle Virbitsky and Cole Irvin.
[7] He split the season between the Double–A Midland RockHounds and Triple–A Las Vegas Aviators, playing in 131 games and hitting .321/.386/.456 with nine home runs, 71 RBI, and 13 stolen bases.
[8] On March 26, 2024, manager Mark Kotsay announced that Hernáiz had made the team's Opening Day roster.
After going 3-29 (.103 batting average) to start the season, Hernáiz was optioned back to Triple-A Las Vegas on April 18.
[10] In a May 7 game against the Texas Rangers, Hernáiz was removed early after stepping awkwardly on first base while attempting to beat out a ground ball.