A front nine of 33 had left McIlroy a shot behind his inspired playing partner Viktor Hovland, who had birdied four holes in a row from the third to move to the top of the leaderboard.
But McIlroy then holed out from a greenside bunker on the par-four 10th for a stunning eagle to briefly vault into the lead, before Hovland held his nerve to birdie the same hole.
At 1-under-par the Ryder Cup team-mates were two shots clear of overnight leader Cameron Smith, the Australian having three-putted the first and then carded seven pars before making his first birdie of the day on the ninth.
England’s Tommy Fleetwood had set the early clubhouse target on a day of low scoring, the 2019 runner-up carding seven birdies and one bogey in a third round of 66 to reach nine under par.
“Today when I was having breakfast it seemed everyone was making birdies everywhere,” Fleetwood said. “I got a good start, the middle stretch was frustrating but a good finish again. The putts at 16, 17 (both to save par) and 18 feel crucial.
“There is a low score out here. It is obviously not in my hands at the moment. All I can do is try to stick in.
“I’d love to be in with a chance coming down the back nine tomorrow, but it is very special to still be in and amongst it.”
Former US Open champion Bryson DeChambeau covered his first 15 holes in six under before four-putting the 16th, saving par from the road behind the green on the 17th and making birdie on the last in an eventful 67 to finish six under.
With 83 players making the cut, England’s Richard Mansell went out alongside marker Scott Herald – one of the teaching professionals at St Andrews – in the first group at 8.35am and made an eagle on the ninth on his way to a 68.