The 29-year-old German was a free agent after his contract with the Hammers was not renewed over the summer.
"I am overjoyed that the transfer has gone through. This is the beginning of a great partnership. The club has big ambitions and a coach who epitomises this," he said.
"I am looking forward to being part of the team, already know some of the players who I have played with at club or international level.
"I am highly motivated and very very happy to take up the challenge," he added.
Hitzlsperger had been linked with a move back to former club Aston Villa, where he spent five years from 2000 to 2005.