Ljungberg, 31, suffered an injury-hit campaign at Upton Park last season after his three million pounds (€3.7 million) move from Arsenal.
He made just 28 appearances and opted to negotiate an early release just one season into his four-year contract.
Ljungberg, who spent nine years at Arsenal, will now consider whether to continue playing, with West Ham’s website claiming “leading clubs at home and on the continent as well as the United States and Asia” are interested in signing him.
“I gave my all at West Ham and enjoyed my time there but the decision is the best for the both of us. Now I will take my time to consider my football future,” Ljungberg told the club’s website.
Scott Duxbury, West Ham United CEO, added: “We respect Freddie Ljungberg’s position and are pleased we could reach agreement and wish him all the best in the future. This deal is mutually acceptable to both parties.”