Joaquin made amends for missing a penalty just before half-time by scoring the only goal of the game in the 64th minute, neatly side-footing home from Manuel Iturra's brilliant defence-splitting pass.
Milan had two great chances to take a point towards the end, Stephan El Shaarawy denied by Willy Caballero before Philippe Mexes volleyed wide, but a third successive defeat for Massimiliano Allegri's men leaves them five points adrift of table-topping Malaga.
The Italians' awful domestic form saw them come into the game just above the Serie A relegation zone, but they started brightly and should have gone in front when Urby Emanuelson squared for El Shaarawy on the half-hour mark, only for the young Italy international to skew his shot wide with only Caballero to beat.
Malaga began to take a hold towards the end of the first period, with danger men Joaquin and Isco looking particularly dangerous, and twice the former pulled passes back to the edge of the area for his team-mate.
After Isco's first effort flashed just over, Milan keeper Marco Amelia did wonderfully to get down to tip his second just wide.
A minute before the interval the hosts were handed the perfect opportunity to break the deadlock when Kevin Constant was adjudged to have brought down Jesus Gamez, but Joaquin blazed the penalty over.
Manuel Pellegrini's men continued to probe after the break and eventually found a way through when a lovely dinked pass from Iturra found Joaquin free on the right side of the area.
The 31-year-old just managed to squeeze the ball between Amelia and the near post for his second European goal of the season.
Eliseu was denied a quickfire second by a brilliant flying save from Amelia and Allegri soon threw on strikers Alexandre Pato and Bojan Krkic in search of an equaliser, with his attacking approach nearly bearing fruit with five minutes remaining.
El Shaarawy controlled an excellent Mexes pass on his chest but his first touch took him slightly wide, allowing Caballero to make a comfortable stop.
From the resulting corner, Mexes' volley from close range was deflected inches wide and Milan were to go home empty handed.