Raonic told the Tennis Channel he was hurt in a semi-final win over former US Open champion Juan Martin Del Potro.
Canada's Raonic, ranked fourth in the world, was playing his first tournament since suffering his fourth adductor muscle injury in 12 months at the Australian Open in January.
Raonic told the Tennis Channel he was hurt in a semi-final win over former US Open champion Juan Martin Del Potro on Saturday night.
"I didn't think much of it," Raonic said. "I thought it was just tightness from the match, but this morning I woke up unable to walk properly and did quite extensive treatment with my team."
"We came down to the conclusion that it was a slight tear of the hamstring in my right leg."
Sock, who added a second title of the year to the one he lifted in Auckland in January, called it "very unfortunate".
"We've had a lot of good battles and I was looking forward to the challenge," added Sock, who claimed a third career ATP title and is projected to reach a career-high 18 in the world rankings on Monday.
"I'd be a little more excited and full of energy if I had gone out and won it on court, but on the flip side, a title is a title."
Sock said that Raonic notified him personally about the withdrawal shortly before he was to warm up for the match.
He said he was surprised after seeing Raonic defeat former US Open champion Juan Martin Del Potro of Argentina in the semi-finals on Saturday night.
"I'm sure Milos would have loved to play, but you've got to look ahead with some big tournaments coming up," Sock said.