Mirza Basic, a lucky loser playing his first main-draw match on the ATP Tour, stunned seventh-seeded Jerzy Janowicz 7-6 (5), 3-6, 7-6 (5).
The 21-year-old Bosnian reached a match point with a drop volley. He won the match when Janowicz reached another drop shot but sent it back long. Basic played because Philipp Petzschner withdrew with a shoulder injury.
Monfils broke serve for 2-1 and went up a break at the start of the second set. Raonic put pressure on Monfils in the final game, but Monfils hit a drop shot followed by a lob and served out the match with an ace.
Once ranked No. 7, Monfils missed several months in 2012 because of a right-knee injury. The Frenchman was ranked 119th last month, but moved to No. 67 this week. Monfils wasted four match points in losing to Tommy Robredo in the third round of the French Open.
"I am just happy to be on court, enjoying every second," said Monfils, who lost in the third round of the French Open.
He added that adjusting to grass from clay in Paris was not easy.
"It's very hard for my movement," said Monfils, adding that he'd rather lose a point than risk re-injuring his knee. "I am more mature after what I went through last year. I've grown up. I try to do simple things."
Raonic has lost both times to Monfils.
In other first-round matches, sixth-seeded Philipp Kohlschreiber cruised past Carlos Berlocq 6-3, 6-1, Ernests Gulbis beat Marcos Baghdatis 6-4, 3-6, 6-3, Leonardo Mayer defeated wild card Jan-Lennard Struff 7-6 (4), 6-4 and Jurgen Melzer outlasted qualifier Riccardo Ghedin 7-6 (5), 3-6, 6-4.
Basic played four matches on grass as a junior at Wimbledon six years ago, and not again until three rounds of qualifying in Halle. He was No. 5 in junior ranks, but the transition to the pro tour has been slow -- he is ranked No. 240.
Basic began playing tennis in his native Sarajevo "because there was nothing else to do, it was after the war and everything was destroyed."
Splitting time between Sarajevo and a tennis academy in Brussels, Basic plays league tennis in various countries while he tries to stay financially afloat.
Basic took a 3-1 lead in the final set, but was broken back immediately by the 22nd-ranked Janowicz, who finished with 16 aces.
"I didn't think I would lose my serve so easily, so I lost some confidence. I was trying to hold my serve and wait for the tiebreaker, I knew that was my chance," said Basic, who served 10 aces.