All eyes had been on Inter striker Antonio Cassano, who had switched sides at the San Siro before the start of the Serie A season, but it was veteran centre-back Samuel who won the game for the Nerazzurri with a headed goal in the third minute.
Riccardo Montolivo was denied the chance to restore parity courtesy of a controversial call from referee Paolo Valeri, but AC Milan only had themselves to blame for failing to capitalise when Yuto Nagatomo's dismissal put Inter on the back foot for much of the second half.
The 'Derby della Madonnina' traditionally allows both Milan clubs to put their domestic travails on hold in the pursuit of bragging rights in Lombardy, but such a toothless display from the Rossoneri could have more wide-reaching consequences for Allegri.
If the Diavolo boss was incensed by Valeri's decision to award Inter a soft free-kick in the third minute, then he would certainly be apoplectic at its conclusion.
Esteban Cambiasso swung the ball across the box from deep, Christian Abbiati flailing wildly as Samuel beat the jockeying pack to head home.
It would have been two almost immediately, if not for Diego Milito's moment of hesitation, the Argentinian clipping tamely against Abbiati before inexplicably heading the rebound into his arms.
Milan had been under the cosh but Montolivo shaved paint off a post with his ripping strike from outside the box, before Nagatomo had to steal the ball off a marauding Stephan El Shaarawy's feet.
And Nagatomo soon went into Valeri's book for overzealously introducing himself to Mario Yepes.
The mercurial teenager drove the ball down Samir Handanovic's throat as the Rossoneri began to grow in confidence and Urby Emanuelson should have done even better when set free by Bojan Krkic.
Kevin-Prince Boateng rifled Daniele Bonera's cool pull-back past a post before Milan had an equaliser chalked off in controversial fashion.
Emanuelson collided gently with Handanovic in the area while challenging for a lob forward, leaving Montolivo to toe-poke the loose ball into the back of the net, but Valeri had already blown his whistle for what he considered an infringement by the Dutchman.
If Milan were rattled by the perceived injustice then they did not let it show, Bojan soon wriggling free to test Handanovic at his near post before the break.
Valeri had ruled against Allegri's men in the first half but he evened things up shortly after the restart as Nagatomo received his marching orders for a second yellow card, this time for a handball.
Andrea Stramaccioni moved quickly to shuffle his pack, invoking both jeers and applause to ring around the San Siro as Cassano made way for Alvaro Pereira.
But Nagatomo's dismissal was to have a lasting effect on the remaining 30 minutes, with Inter opting to close ranks completely and nullify Milan's growing confidence.
It took another stinger from Montolivo to liven things up but Boateng spooned the rebound high and wide with Handanovic scrambling to get to his feet.
Bojan was next to fluff his lines, despite another long-range prompt from Montolivo, but Milan were very much in the ascendancy going into the final 20 minutes.
Giampaolo Pazzini, the bait in the Cassano swap deal, was introduced to expose an ailing Inter backline but his first contribution was to land flat on his back chasing down a sweet Robinho cross.
Andrea Ranocchia's woeful clearance fell to Robinho, who thought fast to tee up Pazzini in the six-yard box, but to no avail.
Abbiati roused himself after a quiet half to block substitute Rodrigo Palacio's low drive, following a rare Inter break, but all eyes switched back to the other end 10 minutes from time.
Robinho and Pazzini were up in arms at Valeri's decision not to award a penalty for Samuel's heavy challenge on the former, the Italy striker going into the book for his ferocious protests.
By this point, Stramaccioni was gesturing wildly from the touchline, and his call to retreat defused both a bombing run from Bojan and a dangerous swerving cross from Robinho.
Allegri wore an expression of weary resignation as 90 minutes of Inter defending came to fruition, the Rossoneri left languishing in the bottom half of the table after suffering a third straight derby defeat.