A.J. Ramos got the final four outs for his 20th save in 22 opportunities. He entered in the eighth and got out of a bases-loaded jam after Scooter Gennett had an RBI single off Junichi Tazawa.
Adam Duvall popped out with two on to end the game.
Cincinnati starter Robert Stephenson (0-4) allowed three runs, four hits and seven walks in 4 1/3 innings.
Dietrich’s fifth home run of the season opened the scoring for the Marlins in the fourth.
Miami pushed a couple of runs across in the fifth with Dietrich drawing a bases loaded walk issued by reliever Drew Storen and Moore hitting a sacrifice fly.
Despite eight walks to Miami hitters through five innings, the Reds only trailed 3-0.
But O’Grady kept the Reds’ offense in check and received help from the defense with left fielder Marcell Ozuna connecting with relay man Miguel Rojas who fired a strike to home plate to throw out Joey Votto to end the fifth.
Dietrich’s bloop single to left in the seventh extended Miami’s lead to 4-0.
Gennett cut the deficit to 4-1 in the eighth, but Ramos got Tucker Barnhart to roll out to first on a slow grounder to end the inning.
Eugenio Suarez had three hits and Votto reached base four times for the Reds.
Reds: SS Zack Cozart (quadriceps) missed his second straight game. “He’s progressingly better,” manager Bryan Price said. “. He’ll have to be active on the field and do all that pre-game stuff before he’s considered in the lineup anytime soon. We’re optimistic that it will be a short stay out of the lineup, but until you see him on the field practicing, then we’re still at least a day away.” . RHP Scott Feldman (knee) is looking to throw a bullpen session in Miami with the Reds in town until Sunday.