Eliseu and Pato scored in either half to give Malaga and Milan a share of the points at San Siro on Tuesday.
A solitary point for Manuel Pellegrini's side would be enough to see them qualify for the knockout stages, and the Chilean Coach did so by naming a near full-strength side for the trip to San Siro.
And it was the Andalusians who started the brighter of the two sides. Inside two minutes, a venomous effort from Martin Demichelis flew over the bar, but the tempo had been set by Los Boquerones.
The visiting team were completely dominating possession and it was only the last-ditch efforts of the Italian side's defence that were stopping Malaga from going a goal up.
The monopolisation of the ball however, was not creating any clear-cut chances, and it almost came back to haunt Pellegrini's men with half an hour gone. A free-kick from Urby Emanuelson forced Willy Caballero into a brilliant save as they breathed a collective sigh of relief.
It was only brief though, as the away side eventually did take the lead on 40 minutes. An incise Isco pass found Eliseu, and the 29-year-old hit a first time effort past Christian Abbiati.
After the break, the Rossoneri seemed reinvigorated from the Coach's half-time words. Emanuelson and Stephan El Shaarawy had decent tries at goal, but just couldn't find their way past the Argentine shot-stopper.
But they eventually did make their efforts count on 75 minutes. A Kevin Constant cross found Pato at the far post, who rose highest and powered a header past the goalkeeper to give his side the draw.
It was enough for Malaga though, as they went through to last 16 for the first time in their history.
Milan 1-1 Malaga
Scorers: Pato 73 (MIL);Eliseu 40 (MAL)
Milan: Abbiati; Abate (De Sciglio 6), Mexes, Bonera, Constant; De Jong, Montolivo, Emanuelson (Robinho 80); Pato, El Shaarawy (Boateng 62), Bojan
Malaga: Caballero; Jesus Gamez, Demichelis, Weligton, Sergio Sanchez; Camacho, Iturra (Toulalan 75); Joaquin (Seba 82), Isco, Eliseu; Saviola (Santa Cruz 69)