The playoff-contending Brewers have lost four of five. Neil Walker's homer in the first inning was all Milwaukee could muster.
Castillo (3-7) retired 11 straight batters in one stretch and 22 of the last 24 while pitching eight innings. He allowed four hits, didn't walk anybody and wound up with a 3.12 ERA in 15 starts.
The Reds are shutting down Castillo to limit his innings. The 24-year-old righty threw 111 pitches, matching his second-highest pitch count of the season, in this start.
Matt Garza (6-9) gave up five runs in 2 2/3 innings. He is 0-3 in his last four starts.
The Reds chased Garza with a five-run third that included Walker's error at first base on a potential inning-ending double-play grounder. Adam Duvall and Jose Peraza each drove in a run during the inning.
Cozart led off the seventh with his 18th homer of the season. Peraza added his fifth in the eighth.