Ljungberg joins West Ham from Arsenal for a fee that could rise to £3m.
The 30-year-old said: “It was the right time to go.
“It was a difficult decision but when Thierry Henry left it felt like the end. I am coming here to build a great team and I am looking forward to it.”
He continued: “Two years ago when I signed my last contract we talked a lot about the future and about bringing great players to the club.
“Despite building the new stadium we wanted to stay top in England and do well in Europe. For me that didn’t really happen.”
He added: “When I spoke to Arsene Wenger, he wanted me to stay.
“But, at at the same time, I feel it had to be something very, very special for me to leave.
“For me it is about why I wanted to join West Ham, not why I wanted to leave Arsenal.
“The reason I wanted to join is because of West Ham chairman Eggert Magnusson.
“He wants to take West Ham to the top of the country. He is willing to go on the market and buy great players and mix them with youth players from the academy.
“I am really happy to be here and he wants me to help take this club forward. It feels like a big challenge and I am really happy with it.”