Jordi Gomez and James Perch struck as Wigan kept their defence going with an heroic display on Sunday afternoon.
Gomez converted a penalty after more bad defending by the erratic Martin Demichelis and Perch tapped in early in the second half as the holders booked a semi-final date with Arsenal at Wembley.
Samir Nasri did pull one back with a 20-yard half-volley on 68 as City produced a strong finish but they were unable to prevent a repeat of Wigan’s shock victory in last year’s final at Wembley.
The result was a tactical triumph for former City striker Uwe Rosler, who has revived Wigan’s fortunes since taking over as manager in December.
For City boss Pellegrini, the decision to leave the likes of Vincent Kompany, David Silva and Fernandinho out of his starting line-up – with Wednesday’s Champions League trip to Barcelona in mind – backfired.
A week ago his side produced a fightback to snatch the Capital One Cup from Sunderland but they could not repeat the feat and hopes of a domestic treble are over.
Wigan may not play the same passing game that they did under Roberto Martinez but, in terms of effort and commitment, their display evoked memories of last year’s glorious cup run.
They created the game’s first chance after two minutes but Gomez blasted well over.
City did appear to gain a measure of control in the opening 25 minutes but with Demichelis in the back line, City looked error-prone.
The former Malaga defender, whose list of gaffes is growing, was the culprit again as he was beaten by Marc-Antoine Fortune and then clumsily brought the Wigan forward down. Gomez rifled home the spot-kick.
City needed to respond and there were promising signs as Nasri wriggled his way into the area only for his cross to drift over the bar.
Wigan refused to be intimidated and Callum McManaman, who ran City ragged at Wembley, appeared in the mood to do so again.
He was brought down crudely by Javi Garcia on the right and then Micah Richards attempted to haul him down on the opposite side. Play continued on the latter occasion and Richards took out his frustration with a mistimed challenge on Gomez.
Several players from both sides then became involved in a melee and McManaman gestured that he had been elbowed. Pictures appeared to back up his claims.
Wigan applied more pressure and it paid off inside the opening two minutes of the second half as James McArthur took advantage of more poor defending to break through on the left. He pulled the ball back across goal and Perch nipped in ahead of Gael Clichy to tap in at the far post.
Wigan threatened another within moments of the restart as Fortune clipped the post but the flag had already been raised for offside.
Pellegrini realised it was time for drastic action and made a triple substitution, sending on James Milner, Edin Dzeko and Silva after 53 minutes.
The changes turned the tide and City gained the upper hand. Dzeko headed against the post and the atmosphere was cranked up.
City set up camp in the Wigan half and broke through the visitors’ rearguard when a low drive from Nasri just outside the area crept beyond the diving Carson.
It was tough for Wigan to hold out and they got lucky when Aguero was incorrectly flagged offside before Dzeko had a shot blocked.
Dzeko then looked certain to score as Milner drilled in a low cross but Emmerson Boyce produced a remarkable last-ditch clearance.
Carson saved well from Aguero, Milner had a shot blocked and Dzeko headed wide as City laid siege to the Wigan goal.
Five minutes of injury time were played and City keeper Costel Pantilimon went forward for a last-gasp corner – but Wigan held on to progress.