The 31-year-old, who spent last season on loan at Lille, has signed an 18-month contract with the Hammers after a forgettable spell on Merseyside.
“I feel like I owe the club a little bit because if it wasn’t for West Ham I wouldn’t be a footballer,” Cole told the Hammers’ website. “This club’s great youth-team coaches taught me the trade.”
Cole, capped 56 times by England, added: “Coming back here brings back all the memories of the pitches I learnt how to play on. This is where I learnt my trade and I’m happy to have another chance to be here.
“I’ve always loved West Ham and I hope I can give the club a few memorable seasons.
“The timing was right for me to come back and I’m happy. I’m back in London and I’m delighted to be here. I want to be here and I want to make an impact.
“The place has not changed much to look at, but I think Sam has done a great job with the team. A few years ago, the club was in a bad way and Sam has done brilliantly.
“All in all, it will always be West Ham and the history will always be here and everywhere I go around the world, people love West Ham. Everywhere I go, people know me for having started here.”
Get 8/1 enhanced odds on Tottenham to win or 11/1 enhanced odds on Liverpool to win at White Hart Lane on Saturday afternoon. Click here to sign up now. T&Cs apply.
MORE: Latest Man Utd news
MORE: Latest Arsenal news
MORE: The latest football news