The 27-year-old had been at St Mary's Stadium since 2011 and will move to the Championship side on loan until the end of the season.
Once the current campaign has finished, the former Celtic and Burnley left-back will be contracted to Forest for the next three years.
Fox made 69 appearances for Southampton, scoring once, and will join a side fifth in the Championship under Billy Davies.
"Danny was an extremely popular member of the dressing room, and leaves with the club's best wishes for his future career," Southampton said on their official website.
"He will be fondly remembered for the role he played in helping Southampton return to the Premier League, and will always be warmly welcomed back to St Mary's."
Fox's arrival comes a day after Algerian forward Rafik Djebbour moved to the City Ground from Olympiacos on a two-and-a-half-year deal.
Meanwhile, defender Aaron Martin has signed for Birmingham City a day after being released by Southampton.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.