Diouf ran from inside his own half and, as the City defence backed off, burst into the area before embarrassing goalkeeper Joe Hart by shooting through his legs.
The goal came in the 58th minute, and for all their subsequent pressure, Manuel Pellegrini's home side could not find an equaliser, allowing Stoke manager Mark Hughes to celebrate a memorable win over his former employers.
Pellegrini felt his side, who started their title defence with comfortable wins over Newcastle and Liverpool, were off-colour. The Chilean said: "We tried to create space but Stoke defended very well, and we couldn't create space. I think in terms of the attitude of the players, we did all we could do but it was a bad day for the creative players.
"It was too easy, the way they scored the goal in a counter-attack, from a corner in their own box and he ran 70 metres to score.
"In these games it is very important to be patient but it is more important not to concede. They defended always with 10 strong players behind the ball."
City's neighbours Manchester United drew a blank as Louis van Gaal's winless start to his reign continued with a goalless draw against new boys Burnley at Turf Moor.
Record signing Angel di Maria made his United debut but could not inspire an improved performance from the side who now have just two points from their first three games.
Swansea, in contrast, kept pace with Chelsea at the top of the table as a flying start set them on their way to a 3-0 victory at home to West Brom.
Nathan Dyer, whose goal beat Burnley last weekend, put Garry Monk's side in front after two minutes before an acrobatic strike from the edge of the area from Wayne Routledge made it two midway through the first half.
Dyer rounded off the win with his second in the 71st minute.
Neil Warnock's return to the manager's post at Crystal Palace got off to the ideal start against Newcastle and finished with a bang as his side claimed a thrilling 3-3 draw.
Dwight Gayle opened the scoring inside the first minute for Palace at St James' Park, but Darryl Janmaat fired the Magpies level before the break.
Although Jason Puncheon restored the Eagles' lead three minutes after the restart, Rolando Aarons made it 2-2 and Mike Williamson bundled home a third for the hosts with two minutes to go.
But Wilfried Zaha, on loan from Manchester United, equalised five minutes into stoppage time to earn Palace a first point of the season.
Midfielder Morgan Schneiderlin scored twice as Southampton came from behind to win 3-1 at West Ham, manager Ronald Koeman's first league victory.
Mark Noble put the hosts in front, but Schneiderlin, keen on a move to Tottenham, levelled on the stroke of half- time and completed the comeback in the 68th minute. Graziano Pelle made the points safe seven minutes from time.
QPR picked up their first points of the campaign, Charlie Austin's goal on the stroke of half-time sealing a 1-0 win at home to Sunderland.