"The safety and longevity of Matthew's career is paramount, we are all very disappointed that Matthew will not be with us in the World Cup but his health is at the fore of our decision," said Prav Mathema, national medical performance manager for the Welsh Rugby Union.
"Matthew will not be available for selection after losing his race for fitness from a persistent neck injury.
"Following a series of injections and intensive treatment and rehabilitation the decision has been made to omit him from the squad to allow him to undergo surgery.
"The medical teams of both the Scarlets and the WRU concluded unanimously to proceed with surgery."
Ospreys hooker Richard Hibbard has been officially added to the squad after fully recovering from shoulder surgery and reaching full fitness whilst in training at national squad headquarters.
Hibbard will now join fellow Osprey Huw Bennett, Dragon Lloyd Burns and Scarlet Ken Owens in contention for selection to play against Argentina in Wales' final RWC warm-up match at the Millennium Stadium on Saturday (kick-off 2.30pm).
Tickets for Wales' final RWC warm-up game against Argentina on Saturday, 20 August, are still available on the WRU's 'buy one get one free' offer at prices from £25 at www.wru.co.uk/tickets or by calling the ticket hotlines 08442 777 888 or 02920 230130.