Trailing Exeter City by a point at the start of the day, FGR knew a result, combined with defeat for the Grecians, would see them go up at the summit of the table.
Jordan Bowery fired the hosts on top for a second time, but the lead only lasted two minutes thanks to substitute Josh March, who, combined with Exeter's defeat to Port Vale, scored the goal that secured the championship.
The result also sees Mansfield finish seventh, which is good enough to reach the play-offs where the Stags will face Northampton Town in the semi-finals.
Story of the match
Mansfield were presented with the first opportunity of the afternoon when George Maris stole the ball from Adams and his shot from the edge of the box was quickly charged down.
A minute later, Kane Wilson guided a cross to the back post where Nicky Cadden was waiting, but his volley was fired over the bar.
After Adams fouled Rhys Oates, Stephen McLaughlin had a sight of goal from the ensuing free-kick, but his 25-yard effort was just wide of the bottom of the left post.
The Stags then opened the scoring as Jamie Murphy cut inside from the left where Bowery deflected his through-ball into the path of Longstaff, whose initial shot was saved by Luke McGee, but he fired home the rebound.
Just a minute later, the visitors came close to an equalizer. Adams' cutback was shot into the waiting arms of Nathan Bishop by captain Jamille Matt.
The lead was nearly doubled as Oates' ball at the near post was directed on goal by McLaughlin. However, the ball rolled just wide as Mansfield held a one-goal advantage heading into halftime.
Forest Green would soon grab the equaliser as Adams was played through on goal and he knocked the ball to the left of Bishop and finished.
In the 73rd minute, Cadden cut in from the right and passed to Jack Aitchison, but Bishop gathered in his close-range effort.
Five minutes later, the hosts were back in front as McLaughlin's cross into the box found Bowery, whose shot into the bottom right corner eluded McGee.
The 86th minute nearly saw Mansfield grab a winner as Longstaff's cross into the box was scrambled goalwards by Oates, but McGee firmly held.
Man of the match: Stephen McLaughlin
He was involved in every key sequence of play for Mansfield whether it was sending in crosses, re-directing shots on goal or being a constant threat in attack. A wonderful display as the Stags head into the play-offs.