Milan win in Auxerre to seal last 16 spot
Ibrahimovic netted the first goal in the 64th minute before Ronaldinho added the second during injury-time.
The result guaranteed Milan second place in Group G as Ajax Amsterdam slumped to a 4-0 defeat against leaders Real Madrid.
Swede Ibrahimovic had previously crushed Auxerre in September's group opener when he scored two goals in three minutes to give Milan victory.
"That is what it is like to play against talented players. With half a chance, they sweep the ball home. They have Ibrahimovic up front who can make the difference anytime he wants", Auxerre midfielder Benoit Pedretti told French channel Canal plus.
"We did a good match, we gave our maximum, we keep learning, he added. We showed our limits, we tried to enjoy ourselves. There are no regrets to be had."
With one round of group matches left, Milan have eight points, four more than Ajax. Auxerre are bottom on three points but are still in with a chance of a Europa League spot. Real Madrid have won the group with 13 points.
"We tried our hearts out. It was a difficult match, a difficult venue. We can relax a bit in the last game," Ibrahimovic told Sky.
"We will play our game and whoever we meet in the next round, we will win," he added.
Auxerre produced a convincing display in the first half as seven-times European champions Milan appeared satisfied to wait for a defensive error from the hosts or a flash of inspiration from Ibrahimovic.
The French club piled on early pressure on to Milan's defence, forcing goalkeeper Christian Abbiati to make several saves.
AC Milan had to wait until the 22nd minute for their first chance on goal with a Clarence Seedorf volley from the edge of the box.
Gennaro Gattuso almost opened the scoring for the visitors six minutes before the break when he took advantage of a missed pass by Adama Coulibaly but the Italian midfielder failed to find the target.
After the interval, both teams remained well organised and struggled to reach their opponents' penalty area until Ibrahimovic fired a powerful shot over goalkeeper Oliver Sorin and under the crossbar.
From then on, the Italians had the majority of possession against Auxerre, who had enjoyed an eight-match unbeaten run in all competitions.
Milan's Ronaldinho came on as a substitute for the last five minutes, returning to the pitch where he started his career in Europe with Paris Saint Germain back in 2001.
The Brazilian striker sealed victory for his club with a beautiful curled shot in stoppage-time.
"Definitely getting through gives us more strength. I think for us, it was an important night," Milan coach Massimiliano Allegri told Sky.