Diouf received the ball on the edge of his own area and ran the length of the pitch in the 58th minute before slotting a low shot between the legs of Joe Hart, which the England goalkeeper arguably should have kept out.
It was Stoke's first win of the season and it's first top-flight away victory over City since 1980. It also gave Mark Hughes a memorable victory against his former club, while dealing City its first setback of the campaign after opening with two wins.
Sergio Aguero started for the first time of the season but City's normally potent attack struggled to create chances against a disciplined Stoke defense.
City produced its best attack of the first half just before the break when Aguero's backheel fed Aleksandar Kolarov and his cross was clipped against the woodwork by Yaya Toure.
Samir Nasri went close to opening the scoring soon after the restart but Phil Bardsley made a timely intervention to deflect his effort narrowly wide.
Stoke was not rattled, however, and took the lead in exhilarating fashion just before the hour as Diouf started a breakaway from well inside his own half.
His touched the ball past Kolarov, outpaced Fernandinho to reach the area and then slid a cool shot through Hart's legs.
It nearly got worse for City immediately as Peter Odemwingie robbed Martin Demichelis and whipped in a dangerous cross, but Diouf was inches away from connecting.
Odemwingie had only entered the action at half-time but it proved his last involvement and he was carried off on a stretcher after 65 minutes.
City started to show some urgency and Aguero appealed for a penalty after dribbling into the box and seeing his shot take a deflection which caught Marc Wilson on the hand.
Toure powered forward again only to see a strong drive deflected wide.
Toure then went down in the area three minutes from time as Erik Pieters challenged, but was booked for diving.