Chester took the spoils in the 151st Cross-Border Derby.
John Rooney lit up the 151st meeting between the two rivals with a stunning free kick - before Dominic Vose's penalty levelled at half time. Goals from Tom Shaw and Kane Richards stretched the lead - before Connor Jennings' tap-in was too little, too late for the visitors.
It was a fiery game on the pitch and tense atmosphere in the stands - as Jennings had the first chance; forcing Jon Worsnop to tip over the bar from 30 yards.
Loanee James Roberts had a glorious chance inside the opening 25 minutes - weaving brilliantly inside the box before slicing his shot just wide of the post from ten yards.
Whilst the tempo of the match was fiery and entertaining - there weren't too many chances; until the Blues took the lead through Rooney on 34 minutes.
Roberts drew a foul from ex-Blue Sean Newton thirty yards from goal; enabling the Blues midfield talisman to superbly curl a free kick into the top corner.
The opening goal seemed to wake the visitors up - Worsnop brilliantly denying Javan Vidal before Joe Quigley could only hit the side-netting inside the box.
The Welsh side did get level just five minutes after the opening goal - through a somewhat controversial penalty.
An inswinging corner from Jennings saw Blaine Hudson go down inside the goalmouth, and referee Ian Hussin pointed to the spot; allowing Dominic Vose to calmly dispatch the penalty.
Wrexham could have been in front before the break - Bournemouth loanee Quigley driving into the box before flashing a shot just wide of the far post.
The visitors had a lot of possession, but it was Chester who had the first meaningful chance of the half - a swept Rooney corner was struck by Ross Hannah, but the ball was cleared off the line by Smith.
Kane Richards came on for the injured Hobson at half time - and had an instant impact; finding Hannah who set up Tom Shaw to poke home and put the Blues back in front.
Another Blues goal brought Wrexham forward, a cross-shot was hit hard by Jennings and Worsnop had to tip over the bar.
Nevertheless, the Blues stretched their advantage and it was that man Richards who bagged it - nodding home from Hannah's cross.
The visitors - trying to overturn a now two goal deficit - were still creating; Worsnop denying substitute Wes York.
Wrexham were pushing up to restore some hope - but almost saw the scoreline more resounding for Chester when an ambitious Rooney free kick struck the frame of the goal.
They did manage to claw their way back into the game late on - York driving a ball across the face of goal for Jennings to tap home - but Steve Burr's men clung on for the win.
Chester: Worsnop, Higgins, Hunt, Kay, Sharps, Heneghan, Shaw, Rooney, Hannah, Hobson (Richards 46), Roberts (Chapell 70).
Subs Not Used: Forth, Hughes, Thomson.
Booked: Hannah, Worsnop.
Wrexham: Belford, Vidal, Newton, Hudson, Smith, Vose, Jennings, Moke (York 65), Evans, Quigley (Carrington 70), Nolan (Smith 65).
Subs Not Used: Jackson, White, Evans.
Scorers: Rooney 34, Shaw 58, Richards 69; Vose (p) 39, Jennings 90+2.
Referee: Ian Hussin.