Mejia began the 2017 season with Springfield, and was promoted to Memphis. On June 28, 2017, the Cardinals promoted Mejia to the major leagues.[9] He made his debut the following day, against the Arizona Diamondbacks, when he started at second base and batted eighth, where he went 0-for-2 before being pinch hit for. He had first major league hit and home run against the Washington Nationals on July 1, 2017.[10] He was outrighted to Memphis on November 6, 2017.
Mejia spent all of 2018 with Memphis, compiling a .273 batting average with four home runs and 35 RBI in 108 games.[11] He helped lead Memphis to the 2018 Triple-A National Championship Game, where they defeated the Durham Bulls 14-4.[12] Mejia was named the MVP of the game after going five-for-five with five RBI.[13] He elected free agency following the season on November 2, 2018.[14]
Acereros de Monclova
On January 24, 2019, Mejia signed with the Acereros de Monclova of the Mexican League for the 2019 season.[15] He played in 93 games for a Monclova that year, slashing .350/.393/.496 with 9 home runs, 67 RBI, and 3 stolen bases. Mejia did not play in a game in 2020 due to the cancellation of the Mexican League season because of the COVID-19 pandemic.[16]
Mejia appeared in 50 contests for the Acereros during the 2021 season, and posted a .313/.330/.400 slash to pair with 2 home runs, 31 RBI, and 2 stolen bases. In 2022, he appeared in 81 games, and markedly improved upon the year before, hitting .366/.389/.527 with 8 home runs, 59 RBI, and 3 stolen bases.[17] In 2023, Mejia played in 36 games for Monclova, hitting .271/.343/.295 with no home runs and 17 RBI.
Saraperos de Saltillo
On March 1, 2024, Mejia was traded to the Saraperos de Saltillo in exchange for Francisco Pérez.[18]