Goals from Shaun Harrad and a brace from Gerry McDonagh proved enough for the home side.
Darren Carter had pulled one back for the visitors on 68 minutes, but despite pressure Rovers could not find another.
Early on Carter had seen his penalty saved by impressive Wrexham goalkeeper Luke Coddington.
Wrexham manager Dean Keates told BBC Radio Wales: "It's been long overdue. They were outstanding first-half, magnificent. In the second-half we were put under a lot of pressure, but they were brave.
"They did everything we asked of them and I am very proud of the lads."
Match ends, Wrexham 3, Forest Green Rovers 1.
Second Half ends, Wrexham 3, Forest Green Rovers 1.
Goal!  Wrexham 3, Forest Green Rovers 1. Gerry McDonagh (Wrexham).
Rob Evans (Wrexham) is shown the yellow card.
Substitution, Wrexham. Leo Smith replaces Paul Rutherford.
Drissa Traoré (Forest Green Rovers) is shown the yellow card.
Gerry McDonagh (Wrexham) is shown the yellow card.
Substitution, Forest Green Rovers. Fabien Robert replaces Christian Doidge.
Goal!  Wrexham 2, Forest Green Rovers 1. Darren Carter (Forest Green Rovers).
Substitution, Wrexham. Callum Powell replaces Shaun Harrad.
Substitution, Forest Green Rovers. Emmanuel Monthe replaces Daniel Wishart.
Second Half begins Wrexham 2, Forest Green Rovers 0.
First Half ends, Wrexham 2, Forest Green Rovers 0.
Goal!  Wrexham 2, Forest Green Rovers 0. Gerry McDonagh (Wrexham).
Goal!  Wrexham 1, Forest Green Rovers 0. Shaun Harrad (Wrexham).
Penalty missed! Bad penalty by  (Forest Green Rovers).  should be disappointed.
First Half begins.
Lineups are announced and players are warming up.
National League leaders Forest Green Rovers lost out as Wrexham boss Dean Keates earned his first win since taking charge last month.