He set the modern-era (since 1900) record in Miami's game against the Atlanta Braves and became the second pitcher in MLB history to strike out the first nine batters in a game, joining Mickey Welch, who achieved the feat in 1884.
Lopez struck out Ehire Adrianza, Freddie Freeman and Ozzie Albies each swinging in the first inning. And then he struck out Austin Riley, Orlando Arcia and Dansby Swanson each swinging in the second inning. Guillermo Heredia struck out looking, Kevan Smith struck out swinging and Ian Anderson struck out looking to end the third.
His performance came on the one-year anniversary of his father's death.
"There were a lot of emotions and mixed feelings out there today. My dad meant so much to me in my progression,'' Lopez said. "Being able to perform and get (that accomplishment) was really cool and really special.''
Lopez threw 30 of his first 35 pitches for strikes. The Venezuelan began the day with 102 strikeouts over 95 innings in 18 starts this season.
"I wanted to execute and not leave anything out over the plate to those guys,'' he said. "I just wanted to get ahead in the count and use my purpose pitches to set up other pitches.''
The second time around in the batting order was not as kind to the 25-year-old Lopez.
After getting Adrianza on a grounder to first to start the fourth inning, Lopez allowed three hits in the next four at-bats. Freeman broke up Lopez's sensational start with a double into the gap in right-center field, and Albies and Arcia added RBI singles.
Lopez is the 11th pitcher in MLB history to strike out nine straight batters in a single game and the third to do so this season. The New York Mets' Jacob deGrom and Philadelphia Phillies' Aaron Nola, who also pitch in the National League East, each struck out nine consecutive batters earlier this season. Nola's streak reached 10 consecutive batters in a game against the Mets, tying Tom Seaver's major league record for consecutive strikeouts in a game.
Lopez pitched six innings, allowing five hits and three runs, walked three and struck out the nine batters to earn the victory, improving to 5-5 for the season as the Marlins held on to beat the Braves 7-4.
ESPN Stats & Information and The Associated Press contributed to this report.