Six-cap England international Shelvey joined the Magpies from Swansea in January 2016 and while United were relegated from the top flight at the end of that season, he played an integral role as Rafa Benítez's side bounced back at the first time of asking by lifting the Sky Bet Championship trophy.
And he continued to be a key figure for United in the Premier League - with his winning goal against Leeds United just over 12 months ago a turning point in Newcastle's season as Eddie Howe's side climbed away from the relegation zone to finish 13th.
Injuries restricted the 30-year-old to five appearances this term, but he moves to the City Ground having represented United 202 times in all competitions, scoring 18 goals. He will be reunited at Nottingham Forest with Chris Wood, who joined Steve Cooper's side on loan earlier this month, as well as former team-mate Jack Colback.
Head coach Eddie Howe said: "Jonjo has been a loyal servant to the club for many years and I want to thank him sincerely for his efforts and commitment during my time here.
"He is a brilliant player who has given so much to the cause, and he leaves with our best wishes for the future."