Raonic suffered a major letdown 24 hours after knocking out Andy Murray, managing only four aces and getting just one unsuccessful break chance on his Ukrainian opponent's serve.
The Thornhill, Ont., native last played in the semis six months ago in Tokyo after winning the Bangkok title.
"He did a lot of things well, but I thought I did a lot of things well," said Raonic. "I really was pushing myself, hoping that if I forced myself to stay strong with an attitude that the game would come.
"I just wish I could have served better. He did the right things at the right times right away from the start of the match. He was a factor of why I didn't serve as well as I would have liked as well."
Given the political situation in his troubled homeland Dolgopolov appeared as the obvious Californian crowd favourite with a national flag hanging in the stands over the empty seats of tournament owner and software billionaire Larry Ellison.
Raonic's loss also prevented the 23-year-old from returning to a top-10 ranking on the ATP, He will move on now to next week's start of the Miami Masters, where he had to withdraw in 2013 before his third-round match due to illness.
Raonic was broken in the second game by Dolgopolov, who set the tone for the afternoon at the Tennis Garden. The son of a tennis coach held his winning margin as he claimed the opening set in 29 minutes to keep Raonic on the back foot.
The momentum looked to be turning early in the second set, when Raonic broke for 2-0, reaching 3-0. But the determined Dolgopolov got it back as he won a marathon eight-minute fifth game to break Raonic.
Raonic saved four break points in the game but double-faulted on a valuable game point before a down-the-line winner off the Ukrainian racquet made the winning difference, 3-2.
Dolgopolov built from that point, breaking for 4-3 and closing out the win on his first match point.
Raonic moves onto Miami satisfied with his progress after competing for the first week since the Australian Open due to an ankle ligament injury.
"If someone offered me a signed piece of paper to say, 'Would you like to be in the quarter-finals this week' — especially with what I have been struggling with — I would have signed that sheet right away. I think that says enough."