In 2017, Ozuna was named NL Player of the Week for the week of April 10–16 after batting .435 with four home runs, 12 RBIs, and a 1.481 OPS.
Ozuna was named a starter for the NL in the 2017 MLB All-Star Game. Of the NL All-Star selections, he was one of eight to hit at least 35 home runs, but Ozuna was one of just four to walk at a rate of at least nine percent while striking out less than 22 percent. He established career highs in numerous categories, including batting .312 with 37 home runs and 124 RBI. He was named the NL Player of the Week (along with teammate Giancarlo Stanton once again for the week of September 18–24 after batting .500 (10–20) with three home runs, seven RBIs, and six runs scored.
On December 14, 2017, the Marlins traded Ozuna to the St. Louis Cardinals for Sandy Alcántara, Magneuris Sierra, Zac Gallen, and Daniel Castano. On January 12, 2018, it was announced that the Cardinals and Ozuna reached agreement on a one-year, $9 million contract. Prior to the 2018 season, Mike Petriello of MLB.com rated Ozuna the best left fielder in the major leagues, opining him as "a strong fielder," and averaging the 12th-highest exit velocity [91 miles per hour (146 km/h)] over the prior three seasons of all hitters with at 1,000 plate appearances.