The Frenchman has been without a club since being released by Marseille last season. He was axed by the Ligue One following a physical altercation with one of the club's supporters.
Evra spent time under Moyes at Manchester United, and he's looking forward to working under the Scotsman once again.
He told the club's website: "I have known the manager since we were in Manchester and since the first meeting we had there, we have been straight and honest and it was the same when I saw him on Tuesday, talking straight and honest.
"He is really glad to see me and I am the same. I like to work hard for the Club, because that's the most important thing, but the manager is really important and I like to have a good relationship with every manager I play with.
"Even when I was in Manchester United, we had a great relationship and for me that will keep going on when I play for West Ham under him. I will just do the same.
"He trusts me and I trust him. Now, we can talk a lot but the most important thing is acting on the pitch."