Rochdale kept up their remarkable away record and condemned Wrexham to a fourth league defeat in a row.
Wrexham were in trouble early on when midfielder Silvio Spann was cautioned for a foul and he was later substituted in a second-half reshuffle that kept him out of harm's way.
Rochdale had the better of early play and scored a quick goal.
Kallum Higginbotham squared the ball back across the goalmouth and Glenn Murray was on hand with a crisp finish from close range.
Steve Evans should have put his side level soon after when, with his back to goal, he hooked wide from Ryan Valentine's accurate cross.
Rochdale burst through again and Murray was narrowly off target from ten yards before shooting wide from Adam Rundle's cross.
Rochdale had two appeals for penalties turned down, but manager Keith Hill said he had no complaints.
Another Wrexham chance went begging when Steve Llewellyn missed after being set up by Michael Proctor and as the ball ran clear, co-striker Neil Roberts went full stretch but could not get a final touch six yards out.
Rochdale had another chance before the interval with Higginbotham angling his shot past the post.
Wrexham brought on Gareth Evans for Spann for the second period and switched formation, pushing Steve Evans up front, while Neil Roberts dropped back to midfield where he had an effective game without managing to turn the tables.
Ex-Wrexham player Lee McEvilly sank his former side with Rochdale's second goal on the hour, finishing off from Higginbotham's cross which Rundle turned across the box.