The 23-year-old has joined the Hammers on loan with a view to a permanent deal next summer.
“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 club’s 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.”
West Ham boss Sam Allardyce said: “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.”