The England international has been linked with a move out of Anfield for much of the summer, and has now moved to Upton Park which could result in arrivals at Liverpool
Goal.com understands that the Hammers have a 17 million pound option to purchase the forward but have no commitment to buy him as part of the terms of the deal.
The striker arrived in east London for a medical on Thursday after a summer of speculation, linking Carroll with a move to either Upton park or his former club, Newcastle United.
"It's great to be here at West Ham and all signed up - I just can't wait to get started now," Carroll told the Hammers' official website.
"I want to be playing games and obviously hoping to score some goals. I know the manager well and some of the lads, so it is nice for me to come to a place where I know people.
"I'm hoping to add a lot of goals and create a few chances. I know Sam from Newcastle and he was a massive reason for me coming. When I worked with him at Newcastle it was great so it was a no-brainer really."
Irons boss Sam Allardyce was also delighted to secure Carroll's signature, having previously managed him at Newcastle.
Allardyce has notably introduced a more physical approach since taking over at Upton Park, but denied that Carroll's meant a definite continuation of that, also praising the big striker's ability with the ball at his feet.
He added: "I think for all parties this is a great signing. Andy is an all-round footballer, but because he is 6'3" and one of his strengths is his aerial power, everybody dismisses the ability he possesses on the floor.
"Hopefully he can score goals for us and we will be in a very good position at the end of the year in the Barclays Premier League."
Carroll became the most expensive English player in history when he moved to Anfield on deadline day in winter 2011, but injury and poor form saw him fail to establish himself on Merseyside, scoring just 11 goals, in 58 appearances for the Reds.
Follow GOAL.COM USA on