The world No 1 threw his hands in the air and high-fived playing partner Rickie Fowler after his 9-iron from 177 yards at the par-3 15th landed a yard from the hole, hopped right and trickled into the cup.
“It never left the pin,” McIlroy said after ticking off one of the few things he’d yet to achieve in his golf career.
A six-under 66, completed with a 15-foot birdie putt at the 18th, moved McIlroy into third place on 11 under, two shots behind Kaymer, to set up a potentially thrilling duel over the weekend between two players who won three of last year’s majors.
McIlroy will do well to dislodge Kaymer, though. The US Open champion followed up a first-round 64 with a 67 to give himself a great chance of a fourth title at the National Course, where he won in 2008, 2010 and 2011.
Kaymer, who maintained his one-stroke lead from overnight, is a strong front-runner, as shown by his wire-to-wire victories in last year’s US Open and in Abu Dhabi in 2008. He is even threatening to challenge his own record low total in this tournament, set in 2011 when he shot a 24-under 264.
“It’s one of the only tournaments where you stand on the first tee and you pretty much know you have birdied every single hole,” said Kaymer, whose second-round highlight came on his 10th hole when he chipped in for birdie from a greenside bunker.
Separating Kaymer and McIlroy on the leaderboard is Thomas Pieters, a strapping 22-year-old Belgian who is starting to fulfil his potential after an impressive college career in which he was NCAA champion in 2012. Pieters, seeking a first European Tour win, shot a 67 for 12-under.
Only three Scots survived the halfway cut – Craig Lee (68), David Drysdale (71) and Paul Lawrie (73) all sitting on three-under. Richie Ramsay missed out by a shot, despite a second-round 69.
Also among the players to make an early exit in the first tournament in the annual Desert Swing were defending champion Pablo Larrazabal, Swede Henrik Stenson and Italy’s Matteo Manassero. Fowler shot a 75 to drop to two- under and just make the weekend.
McIlroy recalled making ten holes-in-ones, the last coming in a pro-am two years ago. His first came at the age of nine and was also a 9-iron, on that occasion from 106 yards at his home course in Holywood, Northern Ireland.
But one of the most thrilling feats in golf had evaded him in competitive professional play until he stepped up at the 15th, slightly downbeat after missing very makeable birdie putts on 13 and 14.
“I didn’t need to get the putter out on that hole,” said McIlroy, who walked up to the cup, repaired his pitch mark and scooped the ball out to whoops and hollers from the crowd.
McIlroy was delighted with his ball-striking on a day that revived memories of his stunning year in 2014, when he won two majors and returned to No 1. He has quickly shaken off the rust following time off over Christmas.
“Ball-striking, couldn’t really fault it,” McIlroy said. “Just really happy with how I’m playing.”
Kaymer is playing even better, though. Out early in benign conditions, Kaymer’s unforgiving driving and iron play was as strong as in the first round but his putting wasn’t as prolific.
His bogey-free score contained five birdies and should have been lower, with a three-footer on No 6 (his 15th) one of a number of birdie chances spurned.
“My game feels like there’s isn’t much that will go wrong,” said Kaymer, who is 100 under par for his last 30 rounds on the National Course. Austria’s Bernd Wiesberger shot a 65 for the lowest score of the second round.