The 31-year-old striker was let go by the Hammers at the end of the 2013 season, only to return to Upton Park a few months later.
He scored three goals in 26 appearances in all competitions last season but will now be on the lookout for a new club.
He tweeted: “Looking forward to my next adventure. I have spoken to West Ham United and it has been decide not to extend my contract.
“I wish West Ham United all the best and I will look out for their progress in the future. Thanks for a great 9 years. it’s been emotional.”
Cole was close to leaving West Ham to join West Brom on Deadline Day in January but the move fell through at the last minute, much to his frustration.