Raonic, the 12th seed from Thronhill, Ont., had been bidding to duplicate the career-best third-round showing at the Monte Carlo Country Club he achieved in 2011.
"It was a tight match, I'm quite disappointed with his loss," Raonic said. "I had a lot more opportunities and I didn't take advantage of them or make the most of them today.
"I like the way I was playing in the second set, I was a lot more aggressive and that's what I needed against a guy like him. But in the third I missed on a few key shots and that really made the difference. It all came down to a few critical errors."
Nieminen, a match-tough campaigner ranked 49th, took full advantage of 40 unforced errors from Raonic to advance.
Raonic, a major part of Canada's win over Italy in the Davis Cup world group quarter-finals, had been expecting a tough match against Nieminen, almost a decade his senior.
Raonic now stands 14-5 on the season with a title in San Jose two months ago. After his doubles with Australian Bernard Tomic is done, he heads off to his training base of Barcelona for next week's clay event.
"I have some work to do on clay, getting more used to the surface again," Raonic said. "I need more matches and more practice, I need to work on improving for next week."
It was the second meeting between the two, Nieminen beat Raonic indoors last September in Bangkok, a match which the Raonic had said he was hoping to improve upon.
Raonic lost serve in the sixth game of the first set as Nieminen eventually took the early lead after a 42-minute opening chapter. But Raonic stormed back in the second with his only two breaks of the match, to level at one set apiece.
The third went into a tiebreaker,where Nieminen used his years of clay experience to grab a 4-2 lead and put the pressure on Raonic.
Raonic, ranked 15th in the world, then sent an overhead shot wide to trail 2-5. Nieminen quickly nailed down four match points, but sent backhand into the net on the first. He came good on is second to end the win in just under two hours as Raonic sent a backhand cross-court return wide.