Bolton Wanderers 2 Sunderland 0
Only an unlikely set of results on the final weekend of the campaign will send Wanderers down to the Championship.
Diouf has stated his desire to quit the club at the end of the season and his lap of honour after Bolton's third win in four games suggested as much.
The controversial Senegal striker netted his fifth goal just before half-time to give Bolton a vital breakthrough.
And the former African Footballer of the Year continued to torment lacklustre Sunderland throughout the 90 minutes.
An own goal by substitute Daryl Murphy sealed the win to leave Wanderers so close to survival.
Bolton were handed a double boost before kick-off courtesy of the results at Craven Cottage and Madejski Stadium.
As expected, Kevin Davies made his return from a two-game ban, but he opted not to wear a protective cast on his broken hand.
And Diouf was recalled from the bench for his last ever appearance at the Reebok in a Bolton shirt.
Ivan Campo didn't have that luxury as a calf injury forced him to watch proceedings from the sidelines and it will be a surprise if he doesn't move to warmer climes in the summer.
Given the stakes, it was a tepid first half until Diouf's moment of brilliance.
Michael Chopra lobbed the ball into the net but only after a clear foul on Ali Al-Habsi.
Davies, predictably, had Bolton's best effort; rising highest to meet a Diouf cross but he was unable to keep his header below the bar.
Kenwyne Jones quickly retaliated with a right-foot shot inside the area that Al-Habsi saved at the foot of his post.
And just as the crowd became frustrated by Bolton's failure to breakthrough, Diouf came to the rescue.
Kevin Nolan's cross from the right drifted to the back of the penalty area where Diouf controlled deftly and then curled in a delightful shot out of Craig Gordon's reach.
It was the one moment of quality in an otherwise disappointing game - not that the quality of the football mattered too much to Bolton's delirious fans.
In truth, Wanderers never looked likely to throw away their lead and when Murphy glanced home Matt Taylor's in-swinging corner, the celebration party started.
Diouf milked the applause for all it was worth at the end and with good reason.
"If he goes, he goes with our best wishes," said manager Gary Megson. "But you never know as he says one thing one moment and one thing the next."