It was the Hammers first away victory since August 2009, and it was largely down to the Nigerian's endeavour.
He fed Frederic Piquionne on 35 minutes and the Frenchman finished superbly.
Sunderland were level just before half-time. Asamoah Gyan escaped his marker at the near post to direct a header in from a Jordan Henderson corner.
West Ham deservedly restored their lead on the hour when Pablo Barrera, one of the more impressive performers on the night, cut in from the right and found the Nigerian with time and space to take a touch before beating Mignolet low to the keeper's right from 15-yards.
It is the Hammers' first away win in 23 attempts, and the first time they have knocked a fellow Premier League side out of the League Cup since 1997.
Manager Avram Grants ays there is more where that came from.
"It's important psychologically to win," Grant said, as West Ham prepare to welcome Tottenham Hotspurs this weekend.
"The players showed that if you keep on doing the right things, then you get your rewards. Because of that I'm very optimistic about the future. Bottom of the table is not a place for us but we have to take the points to show that's the case."