Black Cats manager Roy Keane told his club's official website: "We needed to strengthen our defence and Anton is a great signing."
The 23-year-old Peckham-born player, brother of Manchester United and England defender Rio, becomes Keane's ninth signing of the summer.
Keane said: "He'll bring quality and competition for places which is what we want, hopefully we can take him to another level here at Sunderland.
"He has come through the ranks at West ham and maybe just needs a change."
The player said: "It was hard leaving West Ham because I have been there for 16 years but after meeting Roy Keane I knew it was time for a change.
"This is a great challenge for me and I feel it is an exciting time at Sunderland. I think the move will do me good."
Ferdinand follows Teemu Tainio, Pascal Chimbonda, Steed Malbranque, Nick Colgan, David Meyler, El-Hadji Diouf, David Healy and Djibril Cisse to the Stadium of Light this summer.
Keane is targeting one more player - possibly a left-back - before the transfer window closes next week.
He explained: "I have one more player in mind and then that is the end of it for a few months at least."
Ferdinand, who is recovering from a hamstring strain, is likely to be available for the game at Wigan on September 13.
__________________
I NEVER fail, i'm just SUCCESSFUL in finding out what doesn't work Freedom is never voluntarily given by the oppressor; it must be demanded by the oppressed.