The French player bogeyed the 17th hole on day two and missed the cut, but a birdie at the end allowed him to finish the weekend at one under, eight shots behind the halfway leader.
He then added an eagle and seven birdies on the third day to set a new course record and finish at 10 under, tying him with Danish rookie Sebastian Friedrichsen, German veteran Marcel Siem and Shubhankar Sharma of India.
“Of all the birdies I’ve made so far this week, the one I made yesterday on 18 was the biggest one,” he said. “I had bogey on 17 and was out of the cut and I had no choice but to hit the hole and putt, and that’s what I did.
“I came back this morning feeling like I had nothing to lose. The conditions were great and the greens were pristine. I made the most of it and it was a fantastic day.”
Sim, who won his fifth DP World Tour title and first in eight years at last season's India Open, is making his comeback after undergoing shoulder surgery in February.
Playing in just his fourth tournament since his comeback, he shot a third-round 66 that included seven birdies and two bogeys.
“I'm really, really happy,” he said. “I played such good golf earlier than I expected. My plan was to prepare for the Open. But I'm really happy.
“Consistency in play and bounce is really important. I really like this golf course. It's very tricky and you have to fiddle with it all the time.”
Sharma shot a bogey-free 67, while Frederickson shot a 68 with five birdies and two bogeys.
Spain's Adrian Otaegui shot 69 to finish one shot behind the leader, one shot ahead of a group that included England's Andrew Wilson and that had 26 players within four shots of the lead.