The Football Association confirmed the news in a statement, adding that no replacement is being called up by Roy Hodgson at the present time.
"Andy Carroll has been ruled out of the England squad for the upcoming internationals with Republic of Ireland and Brazil," said the FA statement.
"Carroll had been named in Roy Hodgson's squad that will take on Ireland at Wembley on Wednesday, May 29, and then travel to Rio to face Brazil on June 2, but has now been forced to withdraw through injury.
"No replacement will be made at this time."
The news is a blow to Hodgson, who has already spoken glowingly about Carroll's end-of-season form at West Ham.
There is no obvious alternative to the burly forward in the remainder of Hodgson's squad, which also includes Manchester United pair Wayne Rooney and Danny Welbeck, plus Liverpool's Daniel Sturridge and Tottenham forward Jermain Defoe.
England's players are due to meet up at St George's Park on Sunday, by which time it should be known whether Tom Cleverley will be available after he suffered a calf injury during United's 5-5 draw at West Brom on Sunday.