A lucky goal from Michael Symes halted Shrewsbury Town's slide down the table and secured their first win in eight games.
Ex-Wrexham man Neil Wainwright started the move, beat two defenders and saw his final pass spin off Steve Evans' legs for Symes to jab it home.
The luckless Evans had nearly given the Shrews an earlier goal with his attempted headed clearance from a Dave Hibbert header.
The ball was about to go into his own net when goalkeeper Anthony Williams went full stretch for a brilliant save, tipping the ball over the bar.
Hibbert had missed Shrewsbury's first chance when he was clean through and unmarked from a Wainwright cross and failed to get any power into a weak header that dropped harmlessly wide.
Wrexham set the pace early on when a new loan signing Matty Collins, in his first game since arriving from Swansea City, fired wide from the edge of the penalty area.
Eifion Williams was then denied when he saw a firm shot tipped away by Town keeper Glyn Garner.
Another chance went begging when Neil Roberts' deflected shot flew wide and the Red Dragons were out of luck again as Ryan Valentine fired a long-range shot straight at the keeper.
It was all Wrexham at this point and Eifion Williams seemed certain to score as he ran onto a Mike Carvill cross only to lose his footing with the goal at his mercy from just eight yards out.
Substitute Marc Williams replaced Roberts after an hour and had a hand in Wrexham's best raid of the game.
His first shot was saved and went out to Collins, whose shot was blocked, re-bounding to Robbie Garrett, whose 20-yard drive kept low and was about to sneak inside the post when Garner held it at the second attempt.