Deegan struck with 18 minutes left, firing home the loose ball following a Richard Wood free-kick, to give the Sky Blues their first goal in four matches.
Until that point the game had been a story of missed chances.
The visitors enjoyed the better of the early running, with Albert Adomah influential.
Adomah fired into the side-netting and was denied a penalty by referee Phil Gibbs after a coming together with Wood in the box before the hosts hit back.
Carl Baker should have done better than side-foot wide and, after half-time, Gary McSheffrey blazed over when well set.
But in the end the home side found a way through after 72 minutes to claim three crucial points in their bid to avoid the drop.
City started well, and Adomah went close for the visitors inside the first two minutes.
The Ghanaian winger, the subject of reported interest from a host of Premier League clubs, cut inside from the right onto his left foot but could only find the side-netting with his fizzing effort.
The former Barnet man was back in the thick of the action just after the quarter hour, when his bustling run was brought to an abrupt end by Wood inside the Coventry area.
The Robins players wanted a penalty but referee Gibbs waved away the claims.
The Sky Blues saw Baker contrive to miss the target with a side-footed effort from five yards out over the course of the first 20 minutes, as clear-cut opportunities came at a premium.
Adomah was at the crux of each and every significant City foray into opposition territory, and his goalbound shot after 23 minutes was blocked en route to the net by Wood, while Marvin Elliott tested Joe Murphy in the hosts' goal four minutes later.
However, Coventry steadily found their feet and went close when Wood rose highest to power a header towards goal from McSheffrey's corner only to see Cole Skuse clear the danger.
And the hosts almost found themselves in front with 10 minutes left of the first half when Skuse's errant pass was intercepted by Gael Bigirimana, who burst into the area but could not direct his attempt on target and the ball skidded wide.
Ryan McGivern failed to test Murphy after 40 minutes, firing past the right hand post, and the sides went into half-time level at 0-0.
Three minutes after the break, Stephen Pearson headed wide from Neil Kilkenny's cross for Bristol City while Richard Keogh did likewise for Coventry at the other end as the opening goal continued to prove elusive.
Keogh missed to the right of David James' goal after 53 minutes and Nicky Maynard nodded McGivern's free-kick past the right post at the other end, while Elliott was also off target for the visitors from the edge of the box.
The Sky Blues' David Bell thrashed an effort over the crossbar after 64 minutes, and McSheffrey followed suit two minutes later after latching on to Deegan's through ball.
And the match seemed to be destined to remain goalless, until the hosts finally scored with 18 minutes remaining.
Wood's free-kick was only partially cleared and substitute Deegan smashed home his fourth goal for the Sky Blues from 10 yards out.
The Robins tried to retaliate, but Jon Stead was denied by Murphy and Adomah's follow-up was cleared off the line by Cyrus Christie as the hosts held firm to make sure of victory.