The striker spent the duration of the 2012-13 campaign on loan with the Hammers, scoring seven goals in 24 appearances, and signed a six-year contract after passing a medical.
Carroll joined Liverpool from Newcastle United on transfer deadline day in January 2011 for a fee of around £35million after the Reds had allowed Fernando Torres to move to Chelsea for £50million.
He played 58 games for Anfield club in total, and scored 11 times, but was plagued by injuries before new Liverpool manager Brendan Rodgers allowed him to be loaned to the east London club.
Carroll, 24, who also suffered with hamstring injury at the Boleyn Ground, said: "It's fantastic for me to be here. I really enjoyed last season, and that shows in me coming back and making it permanent.
"The fans, the lads and the club itself has been great to me, and what I wanted to do was come back here and play football.
"Since the end of the season I've had a lot of time to think, I've missed it and that's why I'm back. Getting promoted the season before last, then finishing where we did - we did great, and it can only get better for us.
"The way the club's being run, obviously getting the new stadium and everything like that, it's only going up."
Academy product Carroll burst into the Newcastle first-team at the age of 17 and scored 33 goals in 91 appearances.
He made his senior England debut in a friendly international with France in November 2010 and scored his first goal for his country against Ghana at Wembley in March the following year.
Carroll has played nine times for England, scoring his second goal against Sweden in last summer's European Championship finals.