The 24-year-old had been heavily linked with a move to Yeovil Town, but he has instead opted to sign a two-year contract at Oakwell, where he has spent three loan spells since 2007.
Nyatanga told Barnsley's official club website: "I've got really fond memories of my time here.
"I've spoken with the manager and he's so passionate about what they're trying to do here.
"I've bought into that and I'm coming here with a lot of motivation to help push this club up."
Nyatanga has been capped 34 times at senior international level.