Selby had been due to face Ding Junhui in the last 16 but has now withdrawn, giving his opponent a bye into the quarter-finals.
"I'm absolutely gutted to have to pull out and to let down the Chinese fans as I was really looking forward to playing Ding tonight," said Selby.
Despite defeating Chinese player Li Hang 5-0 in the first round, Selby has had to concede his second round match because of the injury.
"I have been suffering with neck pain and I struggled through my first-round match," Selby told worldsnooker.com
"I don't want to do any more damage, especially with the world championship coming up, so I'm going back to the UK to get some treatment. I look forward to coming back to China as I love playing here."
Ronnie O'Sullivan had a comfortable passage into the third round as he defeated Mark Williams 5-1.
It was nowhere near as easy for Stephen Maguire but he edged out Ricky Walden 5-4.
There were also wins for Judd Trump, who beat Stuart Bingham 5-3, and Stephen Lee who won by the same score against Graeme Dott.
In the remaining third round matches Peter Ebdon faces John Higgins, Ali Carter plays Lu Ning and Neil Robertson takes on Stephen Hendry.