Bruno Gama put the Galicians ahead early in the first half but Helder Postiga levelled from the penalty spot and then Paco Montanes put Manolo Jimenez's visitors ahead.
However, Carlos Marchena equalised before half-time and Depor took the lead for a second time 10 minutes into the second half thanks to an own goal by Abraham Minero, whose night was made even worse when he was sent off with nine minutes remaining.
Depor have now won three consecutive games and moved off the bottom of the table for the first time since December 2. Meanwhile, Zaragoza, who have not been in the relegation zone once all season, could find themselves in it by Sunday lunchtime.
The hosts were the better team on the night, enjoying superior possession and creating a greater number of chances.
They took the lead on 11 minutes following a superb team move. Riki picked up possession on the left wing and raced towards the area before playing in Juan Dominguez, who found Juan Carlos Valeron. He played the ball to Bruno Gama, who skinned a defender before rifling a low shot past Roberto at the near post.
Just minutes later Zaragoza were awarded a penalty when Aythami Artiles blocked a cross with his hand. Postiga converted the spot-kick to score his 11th goal of the season.
Depor desperately sought to regain their lead immediately, and would have done so were it not for three fine saves from Roberto. First he produced a double save to keep out a shot by Luis Pizzi and the follow-up by Riki, and then he stopped a close-range header from Alberto Aguilar.
However, Zaragoza then took the lead against the run of play. Montanes robbed Manuel Pablo on the halfway line to begin the attack and laid the ball off to Rodri, who fed Jose Maria Movilla. The veteran then released Montanes with a perfectly weighted pass and the midfielder raced towards goal and produced a brilliant chipped finish to beat Dani Aranzubia.
The hosts did not let their heads drop and were level fight minutes later, though, when Marchena volleyed in from close range.
Depor maintained their superiority in the second half. Aythami hit the post with the goal gaping but the pressure soon paid off, albeit from an unlikely source.
Riki sent in a corner which went beyond the reach of Roberto and it ricocheted off the chest of Abraham and into the net.
Zaragoza struggled to find an equaliser and their task was made even harder when Abraham was sent off for a second bookable offence.
Deportivo coach Fernando Vazquez was then sent from his dugout to the stands for arguing with the referee, but any tension on the part of the coach soon turned to relief when the final whistle sounded.