Carroll's position at Anfield has been the subject of considerable speculation since new manager Brendan Rodgers took charge earlier in the summer.
The 23-year-old had also been linked with a return to former club Newcastle but the Hammers have now acquired his services for the 2012-13 season.
Liverpool FC: "Liverpool Football Club can confirm that Andy Carroll has joined West Ham United on a season-long loan.
"The striker will spend the whole of 2012-13 with Sam Allardyce's team."
Carroll joined the Reds in a club record £35million deadline day deal in January 2011 but has failed to establish himself on Merseyside.
Carroll: "It's great to be here at West Ham and all signed up - I just can't wait to get started now.
"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."
Sam Allardyce: "I think for all parties this is a great signing. Andy is an all-round footballer, but because he is 6ft 3in 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."