The former Spain winger went from potential villain when he fluffed a 44th-minute penalty to hero when he raced on to Manuel Iturra's clever pass in the 64th minute and slotted past Milan goalkeeper Marco Amelia off a post.
It was another sweet moment for the 31-year-old crowd favourite, who missed a spot-kick against Real Valladolid in La Liga on Saturday but went on to score the winner, and he was given a huge ovation when he was substituted late in the game.
"I hit it low but my standing foot slipped and the ball went over," he told Spanish television when asked about the penalty miss.
"It leaves you feeling pretty low but you have to keep faith and again I did that and again I scored.
"If the coach puts me forward to take another penalty I'll do it but, missing twice, I don't think there'll be a third."
Malaga's impressive performance in what was probably the biggest game in the Andalusian club's history continued their superb start to the season after a difficult summer disrupted by cashflow problems and speculation their Qatari owner was looking to sell up.
They have a five-point cushion at the top of the group with nine points from three matches, with Milan on four, and are within touching distance of a place in the knockout stage.
Zenit St Petersburg have three points in third after the Russians' 1-0 win at home to Anderlecht on Wednesday, with the Belgian side on one.
Malaga started briskly on a damp night on the southern Spanish coast and dangerous playmaker Isco twice went close before the referee harshly ruled Kevin Constant had felled Jesus Gamez just inside the area.
Joaquin drove his spot kick high towards goal but it skimmed the top of the crossbar and flew into the crowd, who immediately began chanting his name to try to lift his spirits.
Milan, who have made a woeful start to the Serie A season after selling several of their best players, had little to offer, with Stephan El Shaarawy the only genuine threat.
The 19-year-old drew a sharp save from Willy Caballero late on and defender Philippe Mexes missed a good chance at a corner moments later but ultimately they were well beaten.
In only their second European campaign, Malaga are yet to concede a goal in five Champions League outings, including qualifiers, and they have only conceded three goals in 11 home matches in Europe.
"We knew that Malaga plays very well at home and they have some great players with a huge amount of quality," Milan coach Massimiliano Allegri told a news conference.
"Right now they are the favourites to get through and top the group.
"But we are more or less in a tranquil position so now we focus on this weekend's match against Genoa."
It was a memorable night for the Malaga fans thronging their 29,500-capacity Rosaleda stadium. They were in fine voice despite the heavy rain and thoroughly enjoying their first taste of life among Europe's footballing elite.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.