The visitors suffered a major blow early on when their top scorer Callum Wilson was carried off on a stretcher, and with Eddie Howe's men still seemingly recovering from the shock, Jonathan Walters put Stoke ahead in the 32nd minute with a close-range finish.
A week on from letting a 2-0 half-time lead slip in a 2-2 home draw with Leicester, it then seemed the Potters might have blown it again in the 76th minute when Dan Gosling fired in an equaliser.
But Diouf nodded home with seven minutes to go as Mark Hughes' side finally sealed a victory that takes them out of the relegation zone.
Stoke went into the contest having made their worst ever start to a Premier League season, taking just three points from six games.
But Hughes had stressed in the build-up he had seen encouraging signs from his team and remained confident about their prospects.
They were the first to settle after the match got under way, although that was helped by Bournemouth being unsettled by what happened to Wilson.
The five-goal striker went to ground hurt in the eighth minute having appeared to twist his knee while under the attentions of Philipp Wollscheid.
He received treatment on the field before managing to walk off it - and shortly after, came back on.
That proved a bad decision - whoever's it was - as Wilson was almost immediately back down, his leg having buckled as he ran towards the ball.
He subsequently departed on a stretcher, replaced by Glenn Murray, to leave his team-mates looking a little shell-shocked, and Stoke appeared keen to take advantage.
Artur Boruc was called upon to deal with shots from Bojan Krkic and Glenn Whelan.
And after Matt Ritchie drilled into Jack Butland's arms at the other end, Stoke grabbed the lead when Marko Arnautovic did well to get around Simon Francis on the left and pull the ball back for Walters, who tapped in from close range with clutch of Bournemouth players around him.
It was a third goal in three Stoke appearances for Walters, with his game not appearing at all disrupted by the ongoing uncertainty over his future.
A great chance came Bournemouth's way in the 44th minute, but Erik Pieters did a fine job of blocking Ritchie's shot.
The away side threatened again after the break, with Murray skewing over before having a shot collected by Butland.
And they levelled when Marc Pugh struck from outside the box, the ball ricocheted to Gosling and he finished past Butland.
Butland then saved from Gosling as Bournemouth kept up the pressure, but soon after Diouf intervened with his third goal of the season, stooping to nod in Glen Johnson's fine cross.
Murray subsequently almost brought Bournemouth another equaliser, but Butland saved well.
Source : PA
Source: PA