The centre-back, who was on the bench during Saturday's 4-2 opening day defeat to Ipswich, has gone to Sixfields Stadium on a season-long deal.
The former Welsh international played 28 times during the Reds' memorable double success last term.
But he didn't feature after Paul Heckingbottom took the helm at Oakwell after Lee Johnson's move to Bristol City.
The Barnsley boss bolstered his defensive stocks last week with the addition of Angus MacDonald from non-league side Torquay.
The terms of the agreement mean Nyatanga will be unavailable when the two clubs meet in the first round of the League Cup tomorrow night.