Kerry Carpenter drove in two runs and Parker Meadows, playing in his second career game, had two hits and scored twice.
Tyler Holton (3-2) pitched 1 1/3 innings of scoreless relief and was credited with the win. Alex Lange recorded his 19th save.
Dansby Swanson homered and drove in four runs for the Cubs. Jeimer Candelario added a two-run homer.
Detroit starter Reese Olson allowed six runs in 4 2/3 innings. Cubs starter Drew Smyly (9-9) surrendered seven runs in 3 2/3 innings.
The Tigers jumped out to a 2-0 lead in the first. Ibanez provided the first run with his first homer of the game, which landed over the left-center-field wall. Spencer Torkelson then drew a walk, moved to second on a wild pitch and scored on Carpenter's single to right.
Detroit scored another run in the second. Meadows led off with a single, advanced to third on Zack Short's ground-rule double and scored on Zach McKinstry's sacrifice fly.
The Cubs broke through with four runs in the fourth. Ian Happ walked to lead off the inning. Swanson clobbered an Olson slider over the left field wall. Seiya Suzuki followed with a single and Candelario smashed his 18th homer of the season over the right field fence against his former team.
Detroit quickly regained the advantage in the home half of the inning. Meadows walked and McKinstry singled to spark the rally. Matt Vierling had an infield single, and Meadows scored when third baseman Candelario made an errant throw. Ibanez then launched his ninth homer of the season over the left field wall to put the Tigers up 7-4.
Chicago closed the gap to 7-6 in the fifth. Mike Tauchman walked and Cody Bellinger had a two-out double. Brendan White replaced Olson and promptly gave up a two-run single to Swanson.
The Tigers loaded the bases with one out in the bottom of the eighth. Jose Cuas then hit Carpenter with a pitch, forcing in a run to give Detroit a two-run edge.
—Field Level Media