Miley (3-2) allowed one run and three hits, struck out five and walked none as Milwaukee won for the fifth time in the last six meetings with its division rival. The second-place Brewers maintained a 1 1/2-game lead over St. Louis for the top NL wild card.
"I just feel now I can throw strikes," said Miley, who missed 57 games this season with a right oblique injury. "I guess I trust my pitches and trust my catcher, and the defense is playing great.
"I just threw 78 cutters and three fastballs, so it's a 180 (from last season)."
Mike Montgomery (4-5) struggled with his control for four innings, and the Brewers had their way with a succession of Cubs relievers.
Cain had four walks and a double from the leadoff spot, setting the tone for Milwaukee's offense. Christian Yelich walked and added a two-run double in the seventh, reaching base for the 21st straight game -- the longest active streak in the National League.
The first-place Cubs were hurt by poor defense and committed two errors. First baseman Anthony Rizzo left the game with a bruised right foot but said he was OK and would play Wednesday in the series finale.
The Brewers have four games left with the Cubs, including three at Wrigley Field next week, and have their sights set on winning the division.
"This is how we had to start it," manager Craig Counsell said. "So far, so good. Another series win and try to get a sweep tomorrow."
Milwaukee has won 11 of its last 15 games, and Miley said a division title is on the Brewers' minds.
"Why wouldn't we be?" he explained. "We've still got 25 games to go, 23 games to go. Why not? I don't think you quit thinking about it until you can't think about it no more."
Singles by Hernan Perez and Travis Shaw and a sacrifice fly by Erik Kratz gave the Brewers a 2-1 lead in the fourth inning. Cubs second baseman Javier Baez couldn't catch Shaw's hot shot, a play that was initially ruled an error but was later changed to a hit by the official scorer.
Ragged defensive play by the Cubs allowed the Brewers to extend their lead to 6-1 in the sixth. A routine grounder was booted by shortstop Addison Russell, setting up the rally against left-hander Jorge De La Rosa.
The Brewers scored three more in the seventh and two in the eighth. Milwaukee hit three sacrifice flies in the game. Orlando Arcia had three hits and scored three times.
"We did not pitch well at all after we got by Montgomery," Cubs manager Joe Maddon said. "They didn't really beat us up offensively; we just kind of self-destructed."
Cubs: Rizzo exited in the sixth after fouling a ball off his foot in the third. X-rays were negative. ... Veteran LHP Jaime Garcia, signed Friday after being released by Toronto, joined the Cubs. They selected his contract from Triple-A Iowa and recalled outfielder Mark Zagunis, who was placed on the 60-day disabled list with right shoulder inflammation.
New Cubs pitcher Cole Hamels isn't sure the Chicago-Milwaukee rivalry is a full-blown feud on the level of Cubs-Cardinals or Yankees-Red Sox. He said as much after the Brewers' 4-3 comeback victory on Monday.
Hamels, the Cubs starter that day, said, "When you have the majority of Cubs fans in the stands, I don't know if that's a rivalry."
But the fans flocking to Miller Park this week -- for both teams -- may think differently.
"I look at it like we are spending way too much time trying to classify rivalries," Counsell said. "Enjoy the baseball games, man."
The Cubs hold an 81-77 lead in games at Miller Park since 2001 and a 178-167 edge since the Brewers joined the National League in 1998.
"I think that's always going to be part of this series when you play up here; you're always going to get a lot of Cubs fans," Maddon said. "(A huge rivalry is) something that is achieved over time. Give it time and it may eventually show up that way here."
Cubs: LHP Jose Quintana (11-9, 4.21 ERA) allowed five runs over five innings in his last start against Milwaukee, a 7-0 Brewers victory at Wrigley Field on Aug. 14. Prior to that he had given up just five runs in 49 innings vs. the Brewers. Quintana is 3-1 with a 1.32 ERA in five career starts at Miller Park.
Brewers: RHP Jhoulys Chacin (14-5, 3.53 ERA) will make his 30th start of the season. He is coming off a 4-1 victory over Washington on Friday. Chacin is 2-0 in two scoreless starts and 13 innings pitched against the Cubs this season.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
If not for the pesky Pittsburgh Pirates, the Milwaukee Brewers might be leading the National League Central, or at least running neck-and-neck with the first-place Chicago Cubs.
For the first time in a month, the Chicago Cubs will play after an off-day as they head into the stretch run of what they hope leads to their third straight National League Central Division title.
The New York Mets dinged Max Scherzer's Cy Young chances Thursday night.
Trevor Bauer will take the mound Friday night for the first time in more than a month as the Cleveland Indians host the Boston Red Sox in the first contest of a three-game series at Progressive Field.
Melisa Reidy-Russell has detailed allegations of physical and emotional abuse she suffered throughout a two-year marriage to Cubs shortstop Addison Russell.
DJ LeMahieu's not his team's biggest star, but he's been the glue of Colorado's clubhouse. Still, amid a frenzied playoff chase, his future in Denver could be in doubt.