The 24-year-old was brought to Sunderland by Martin O'Neill in January 2013, making 16 appearances that season as the club avoided relegation.
However, N'Diaye struggled to settle at the Stadium of Light and was loaned out for spells at Eskisehirspor in Turkey and later Betis.
After ending last season at the Estadio Benito Villamarin, as he was unable to avert Betis' relegation to the second tier, N'Diaye will be tasked with helping the former Spanish champions back into the top flight.
"I was happy here and felt valued," he told Betis' official website.
"I always said I would not mind playing with Betis in the Segunda but I'm also convinced that it will only be for a season."