Before returning to his former club, Vincenzo Montella declared his Milan squad to be "fired up" and ready to "raise the bar" during a testing set of fixtures that places Roma and the first derby of the season against Inter next on their domestic agenda.
Although the Rossoneri averted the embarrassment they suffered the last time they played a team stationed in the top half of Serie A – a 4-1 loss at Lazio this month – they failed to live up to that billing in a largely listless outing at the Stadio Luigi Ferraris.
Duvan Zapata – playing against his cousin Cristian Zapata in the Milan defence – passed up a pair of excellent chances as Montella's men wobbled during the opening stages but claimed a chunk of family bragging rights by chesting down and smashing home emphatically form close range in the 72nd minute.
Former Inter forward Alvarez was only introduced in injury time but he stepped up to make the points safe for Marco Giampaolo's unbeaten side.
An untimely slip compounded a wretched day for Cristian Zapata and the Argentine slammed a left-footed shot into the bottom corner.
Referee Paolo Valeri awarded a penalty to Sampdoria in the second minute but correctly overturned the call after a VAR review – Ivan Strinic's cross having struck Franck Kessie's elbow when the midfielder's arm was tucked close to his side.
Despite their reprieve, Milan were unable to assert themselves during the opening stages of the contest and were grateful for Duvan Zapata's wastefulness with a couple of headed chances.
The striker failed to get enough power on a 13th-minute effort after peeling away from Leonardo Bonucci and he made even less effective contact when Lucas Torreira's excellent in-swinging corner found him unmarked four minutes later.
Duvan Zapata got in behind the Milan defence down the left-hand side in the 37th minute, although Gianluigi Donnarumma repelled the shot when he cut inside.
Indecision from Sampdoria defender Gianmarco Ferrari almost gave the visitors a scarcely deserved lead during first-half stoppage time, but goalkeeper Christian Puggioni was out bravely to thwart Ricardo Rodriguez.
The same pattern of play resumed after the break, with Samp captain Fabio Quagliarella dragging wastefully wide, having sprung the offside trap with Duvan Zapata well-placed for the cutback.
Milan's front two, largely starved of service, combined in the 57th minute – Suso curling off target from Nikola Kalinic's lay-off.
Kalinic played Kessie into the Sampdoria box and the Ivory Coast international looked poised to open the scoring, but Torreira got back superbly with a forceful and vital challenge.
Milan were enjoying their best period of the match and Kalinic blazed over on the end of Rodriguez's cross 20 minutes from time, but they soon found themselves on the end of a pivotal blow.
Bonucci was unable to cut out Bartosz Bereszynski's cross from deep on the right and Cristian Zapata's attempted headed clearance went straight to his relative, who made no mistake on this occasion.
Montella sent on playmaker Hakan Calhanoglu and forwards Patrick Cutrone and Fabio Borini in an attempt to salvage the situation, but none of them could match Alvarez's instant impact.
Key Opta stats
- The 22 seconds between Ricky Alvarez's introduction and his goal is a record in Serie A this season.
- Sampdoria have won their last two Serie A games against AC Milan after going winless in the previous eight (D3 5L).
- AC Milan have failed to score in two of their the last 27 league games, both against Sampdoria.
- The Rossoneri had no shots on target during a match for the first time since their August 2015 encounter with Fiorentina.
- Duvan Zapata made the most touches in opposite box (six), had the most shots (four) and shots on target (two) of any player on the field.