A battling win saw Crewe stay up and overtake Gillingham on goal difference.
Only a victory would have given Dario Gradi's side the chance of survival - but ex-Crewe striker Dele Adebola's header gave Coventry a first-half lead.
Substitute Michael Higdon gave his side hope after the break, meeting Luke Varney's centre with an impressive turn and left-footed shot into the net.
Then, Steve Jones put them ahead after turning in another Varney cross - and Gillingham were relegated instead.
Jones had even been an injury doubt before the game, along with defenders Colin Murdock and Anthony Tonkin.
But although all three were fit to play, it was one-way traffic in the first half as Coventry, facing a strong wind, dominated early on.
Adebola headed over after just three minutes, while team-mate Andrew Whing directed his diving header straight at home keeper Clayton Ince.
But the Nigerian forward, who spent nearly five years at Crewe before a £1m move to Birmingham in 1998, finally headed in a Stephen Hughes free-kick after 25 minutes - leaving the Railwaymen needing to score twice.
Justin Cochrane flashed a shot just wide for Crewe just before the interval - and Gradi opted to introduce Higdon for Neil Sorvel at the break.
Higdon, 21, soon gave his side a fighting chance with a fantastic finish after Varney had crossed from the left.
As Crewe pressed for a winner, on-loan Manchester United keeper Lee Steele was lucky to escape with only a yellow card after bringing down Jones.
However, the Northern Ireland international soon had the better of Steele after sliding in to meet Varney's centre with a low shot to make it 2-1 to Crewe.
But minutes after Jones' goal, the news came through that Gillingham had taken the lead at Nottingham Forest - putting the Alex back into the relegation zone.
Crewe needed Nottingham Forest or Ipswich to score against the Gills or Brighton respectively - and with less than 10 minutes remaining, Forest obliged through Eugen Bopp.
That finally lifted Gradi's men back out of the drop zone - and they held on to seal the victory on a remarkable afternoon.
Coventry boss Micky Adams:
"We dominated the first half but if you don't take your chances you don't win games," he said.
"I was pleased with the first half. We changed the system to three at the back and our intention from the first whistle was to go and win the game.
"If you look at the chances we made and the saves the goalkeeper made, I don't know how we lost."
Crewe: Ince, Moss, Billy Jones, Murdock, Tonkin, Lunt, Sorvel (Higdon 45), Cochrane (Moses 88), Vaughan, Steve Jones (White 89), Varney.
Subs Not Used: Williams, Rivers.
Goals: Higdon 54, Steve Jones 72.
Coventry: Steele, Page, Williams, Staunton (Jorgensen 32), Whing, Doyle, Hughes (Morrell 86), Dyer, McSheffrey, Adebola (Goater 68), John.
Subs Not Used: Pressman, Benjamin.
Goals: Adebola 23.
Ref: A Kaye (W Yorkshire).