Centre-back Collins, who will be 35 in August, made 214 appearances for the Hammers across two spells.
He initially joined West Ham from Cardiff in July 2005 and made his debut in a League Cup second-round victory at Sheffield Wednesday two months laterCollins spent four years with the club before moving to Aston Villa. The former Wales international returned to West Ham in the summer of 2012 and established himself as a regular starter under Sam Allardyce following the club’s promotion to the Premier League.
Collins’ final appearance saw him wear the captain’s armband for the last few minutes of the Hammers’ 3-1 Premier League win over Allardyce’s Everton on May 13.
Joint-chairmen David Sullivan and David Gold said: “We would like to place on record our sincere thanks for the outstanding service James has given West Ham United down the years.
“His bravery and commitment on the pitch were never called into question and he has played his part in establishing the club in the Premier League since his return in 2012.
“We appreciate just how popular James is among our fellow supporters but, with the appointment of a new manager, we felt together that the time was right to go our separate ways.
“It goes without saying that we wish James and his family every success in the future and they will always be welcome at London Stadium.”
Former France defender Patrice Evra arrived on a short-term contract in February and played five times for the club. His last appearance was in the 2-0 win at Leicester on May 5.
The former Manchester United defender was sacked by Marseille earlier in the season and banned by UEFA following an altercation with a supporter, but completed a free transfer back to the Premier League.