The 30-year-old midfielder will be reunited in Amsterdam with Martin Jol, who signed Tainio for Tottenham in 2005.
The ex-Spurs coach kept tabs on Tainio after leaving White Hart Lane in 2007 and thanked Sunderland for helping the move go through.
"I am very happy we could strength our squad on the final day of the international transfer market," the Ajax boss told the club's official website.
"Teemu is someone who can do his job in the midfield. He is a winner, a player with a good mentality. I have worked with him at Tottenham Hotspur and continued to follow him.
"I am happy the board at Sunderland was willing to co-operate despite a running deal with Teemu. Therefore it was possible for us to sign Teemu."