Jack Grimmer's winner gave Coventry another great FA Cup memory but ended the reign of Stoke manager Mark Hughes.
Defender Grimmer struck in the second half to push Hughes closer to the exit following the Sky Blues' 2-1 third-round win, and hours later he had been sacked.
Charlie Adam cancelled out Jordan Willis' opener but Sky Bet League Two outfit Coventry outfought and outfoxed Stoke at the Ricoh Arena.
Coventry boss Mark Robins scored the goal for Manchester United in 1990 against Nottingham Forest which is widely accepted to have saved Sir Alex Ferguson's job as head of a team which also included Hughes.
Now Hughes' former team-mate effectively condemned him to the sack after a deserved victory for the home side, who won the FA Cup in 1987 but have fallen on tough times in recent years.
Stoke, who sit in the Premier League relegation zone, were the first to threaten after 11 minutes when Willis hacked Mame Diouf's effort off the line.
But it was a scrappy opening, not helped by the Ricoh Arena's terrible pitch which had been ravaged by the ground-share with rugby union side Wasps.
Stoke remained comfortable and Stephen Ireland, on his first appearance since May 2016 after a broken leg, fired just wide from 18 yards after 21 minutes.
But Coventry stunned their visitors by taking the lead three minutes later.
After a quick break, Max Biamou's shot was deflected for a corner and, from the delivery, Grimmer knocked the ball across goal for Willis to head in.
Stoke were suddenly rocking and the Sky Blues grew in confidence, pushing forward with more purpose although they still needed to remain vigilant at the back.
With £18 million striker Saido Berahino a passenger, Diouf was Stoke's biggest threat but he wasted a fine chance when he headed into the ground and over from six yards.
The Potters were flat and struggling for inspiration and they twice survived in first-half stoppage time.
First, Marc McNulty wasted a golden chance when he rounded Jack Butland but rolled his shot across goal, and then the striker was denied by Butland and saw Geoff Cameron clear the ball off the line.
And McNulty was made to count the cost eight minutes after the break when the Potters levelled from the penalty spot.
Ramadan Sobhi was brought down by Willis and Adam sent Liam O'Brien the wrong way to give Hughes a lifeline.
Peter Crouch had already been summoned from the bench to replace the injured Cameron and, with some confidence restored, the visitors went on the attack.
Kurt Zouma headed over before Crouch deflected Ramadan's strike just wide.
But Stoke were level for just 13 minutes as Grimmer grabbed the winner against the run of play.
The right-back was given too much time to cut in from the flank and his low effort flew past an unsighted Butland.
It sent Coventry through as they survived a late really when O'Brien denied Diouf before, with five minutes left, the striker headed wide from point blank range.
Goalkeeper O'Brien had the final say, turning over Crouch's volley to condemn Stoke to defeat - and Hughes to a rather predictable fate.