Lopez made his professional debut with the Burlington Royals[6] and spent the whole 2016 season there, posting a .281 batting average with six home runs, 29 RBIs and 24 stolen bases in 62 games. In 2017, he spent time with both the Wilmington Blue Rocks and the Northwest Arkansas Naturals, batting a combined .279 with two home runs, 38 RBIs, 24 stolen bases and a .704 OPS in 129 games.[7][8] After the season, the Royals assigned Lopez to the Surprise Saguaros of the Arizona Fall League.[9] He began 2018 with Northwest Arkansas and was promoted to the Omaha Storm Chasers in June. In 130 total games between the two clubs, Lopez batted .308/.382/.417 with nine home runs and 53 RBIs.[10]
Lopez began 2019 back with Omaha.[11] On May 14, his contract was selected and he was called up to the major leagues for the first time.[12] He made his debut that night versus the Texas Rangers.[13]
Overall with the 2020 Kansas City Royals, Lopez batted .201 with one home run and 13 RBIs in 56 games.[14] He had the lowest slugging percentage of all qualified hitters in the AL, at .266.[15] Lopez was nominated for the Gold Glove at second base, having erroneously been omitted from the initial list of finalists.[16] He eventually lost out on the award to César Hernández of Cleveland.
During spring training in 2021, Lopez switched his uniform number from No. 1 to No 8 to allow Jarrod Dyson to wear No 1. Having hit .118 in 34 at-bats in Spring Training, Lopez was optioned to Triple-A Omaha, with Whit Merrifield expected to assume the starting second baseman role.[17] However, an injury to shortstop Adalberto Mondesí in the final game of Spring Training forced him onto the injured list, and Lopez began the regular season as the Royals shortstop.[18] Mondesí was activated and made his season debut on May 25, but returned to the injured list with a separate injury on June 6.[19][20] Lopez was listed on the Royals All-Star ballot at the designated hitter position, despite not having played a game there during the season, as the team put Mondesí on the ballot at shortstop and Merrifield at second base.[21] On August 19, Lopez hit his first home run of the season in a 3–6 loss against the Houston Astros.[22] Lopez ended 2021 with 78 runs, 43 RBIs, 22 stolen bases and a .300 batting average, becoming the first regular Royals shortstop to bat .300 or better in a season.[23] Defensively, he led all qualifying AL shortstops with a .987 fielding percentage.
Atlanta Braves
On July 30, 2023, the Royals traded Lopez to the Atlanta Braves in exchange for Taylor Hearn.[24][25] In his first start for the Braves on August 12, Lopez recorded four hits, including a 3-run home run, at the plate and finished the game on the mound, pitching a scoreless ninth inning in a 21–3 victory against the New York Mets.[26]