Gillingham suffered relegation from the Championship after a dramatic last day of the season.
Despite leading at the City Ground with just 13 minutes of the season left, the Gills went down to League One after Crewe Alexandra came from behind to beat Coventry and Brighton held on to draw with high-flying Ipswich Town.
Forest, already relegated to League One, produced a determined display and almost took the lead in the seventh minute when Neil Harris fired over the bar from six yards out.
When Gillingham hit back, Michael Flynn's 20-yard shot forced a smart save from Forest keeper Colin Doyle.
Gary Megson's side took the lead when Wes Morgan bundled the ball home from close range at the second attempt just before the half-hour. Kris Commons' initial free-kick saw Morgan's header saved by Gills keeper Jason Brown but the Forest star was able to steer home the rebound.
Gillingham piled forward at the start of the second half and deservedly equalised when Nicky Southall's cross was turned into his own net by Andy Melville.
Darius Henderson wasted two chances to put the visitors ahead but they eventually went ahead with 13 minutes left when Mamady Sidibe volleyed home Southall's accurate cross.
But Forest substitute Eugen Bopp sent Stan Ternent's side down when he looped a 25-yard shot over Brown with his first touch of the game.
Gillingham almost saved themselves in stoppage time as Henderson and Darren Byfield both went close but the Gills will be playing League One football next term.