The 25-year-old was leading a low-scoring heat when Ibelli attempted to catch a wave and steal the win with about 30 seconds remaining.
Medina paddled in front of him to stop him from taking off and was penalised for interference, but admitted he'd done it on purpose.
His penalty — losing his second highest score (2.07) — was inconsequential because his highest score (4.23) was still better than Ibelli's two-wave total (1.13). Blocking Ibelli was against the rules, but guaranteed victory.
"I knew if I had an interference I was going to count my big wave," Medina said.
"If it's in the rules, you've got to play the game. I'm stoked to make it through.
"In my head, I knew what I was doing … as I said, it's in the rules."
Ibelli said he first became aware of the cunning plan when he heard Medina's stepdad, Charlie, yelling instructions from the beach. "Now you can burn him, now you can burn him," Charlie said. Medina was pictured responding with a thumbs up.
"It would have been my best wave if he hadn't burned me," Ibelli said. "I don't think I've ever seen that but it shows what kind of competitor he is. He plays tough but dirty. He'll do anything to win and I think that's the mindset of a champion.
"I asked him 'what the heck was that?' and he said 'I'm sorry, I'm sorry'. It just makes me want to win more and get him next time."
The surfing world was stunned by the controversy. Fellow competitor Billy Kemper hailed Medina's competitiveness and calculation under pressure, but others weren't as impressed.
"This is outrageous," commentator Ronnie Blakey said.
"I don't know what to say, I'm absolutely baffled," co-commentator Barton Lynch added. "Did he mathematically know he could win it and take it out of the control of Caio by dropping in? This might be one of the cleverest tactical manoeuvres we've ever seen in the history of the sport."
PIPE MASTERS QUARTERFINALS
Italo Ferreira (Brazil) vs Yago Dora (Brazil)
Jack Freestone (Australia) vs Kelly Slater (USA)
Gabriel Medina (Brazil) vs John John Florence (Hawaii)
Griffin Colapinto (USA) vs Michel Bourez (France)