Hernandez agreed with the Dodgers on a one-year, $5.9 million, contract, avoiding arbitration. On July 23, 2020, Hernandez drove in five runs in an Opening Day 8–1 win against the San Francisco Giants. He played in 48 games during the Dodgers' pandemic-shortened 2020 season, hitting .230/.270/.410 with five home runs and 20 RBIs. He was hitless in five at-bats in the 2020 NLDS. In Game 7 of the 2020 National League Championship Series, Hernandez hit a game-tying solo home run in the sixth inning. With the homerun, Hernandez also became the first player to hit a pinch hit, game-tying or go-ahead home run in a winner-take-all postseason game. Overall, he had 14 at-bats in the series, with four hits (two of them home runs). In the 2020 World Series against the Tampa Bay Rays, Hernandez had two hits in 10 at-bats as the Dodgers won the championship.