McIlroy looked destined for a fourth missed cut in five appearances at Sawgrass, Florida, when he covered the front nine in 42, but the former world No.1 birdied the 12th, 13th, 16th and 18th to make the halfway cut on the mark of level par.
However, the 25-year-old’s 74 left him 12 shots behind Kaymer after the 29-year-old German added a 69 to his course record-equalling 63 in the opening round.
Kaymer was five clear of the field when he signed his card but saw his lead trimmed to a single shot by rising star Jordan Spieth, the American world No.7 being the only player in the field without a single bogey in the first 36 holes.
The 20-year-old added a flawless 66 to his opening 67 as he looks to win golf’s so-called “fifth major” just a month after almost becoming the youngest Masters champion in history.
Spieth only turned professional in December 2012 and was a 19-year-old special temporary member on the PGA Tour when he won the John Deere Classic last July, the youngest winner on Tour since 1931. But he held a two-shot lead after seven holes of the final round on his debut at Augusta before finishing joint second behind Bubba Watson.
Kaymer, who won the USPGA Championship in August 2010 and became world No.1 the following February for eight weeks, said: “I was very happy the way I played golf the last four or five weeks, so the next step is just putting yourself in contention, hopefully win.
“If not, it’s OK, but as long as you put yourself in contention for the next few weeks, especially now we’re coming up to the US Open and British Open.”
Lee Westwood, Justin Rose and Sergio Garcia were all six shots off the lead after adding rounds of 71 to their opening 67s, with England’s Brian Davis a shot behind after a 67.
Of the Scottish trio at Sawgrass, only Russell Knox made the cut. Back to back par rounds of 72 squeezed the Inverness golfer into the weekend. Martin Laird returned an impressive 70 on Friday but was undone by an opening 76 and missed the cut, as did Stephen Gallacher, whose second-round 78 undid the good work he put in on Thursday when he shot 70.
Adam Scott endured a long wait before discovering his latest bid to become world No.1 remained alive, the Australian rebounding from his opening 77 – which featured double bogeys on the 17th and 18th – to return a 67 with three birdies in his last four holes.
Scott, who could have overtaken the absent defending champion Tiger Woods by simply staying at home, needs at least a top-16 finish and eventually discovered he had made the cut with nothing to spare.
“I don’t think I played that much better than yesterday to be honest,” said Scott, who revealed he married his long-term girlfriend Marie Kojzar in a small ceremony in the Bahamas last month.
The Australian world No.2, for several years regarded as one of the most eligible bachelors in global sport, was left on level-par 144, and flirting with the projected cutline which was established well after he had left the course.
“My putting is not that great,” Scott said. “My feel is just way off at the moment. “Anything outside ten feet or even closer, six feet, I just don’t have a good chance. So I’ve got to hit a few good shots here and there.
“My pace putting has been poor, and it’s a big momentum killer. Even today, I was four under through eight holes and 30 feet away on 18 and I three-putt. All of a sudden I’m putting it in reverse again.”
Scott knows he will have to battle hard to give himself an outside chance of claiming the world No.1 spot from Woods.
“Just grind no matter what,” said the 33-year-old from Adelaide. “You know, two rounds like today ... could go a very long way.
“You never know what conditions will be like and what this course can do. Usually a low weekend around quality golf courses like this goes a long, long way, so I’ll be grinding very hard.”
Scott totalled 33 putts in Thursday’s opening round and just 26 on Friday, but felt he still needed to sharpen up his touch on the greens.
“That’s the only thing that I’m going to be really critical on my game,” he said. “Everything else is kind of falling into place where I want it and is up to par, but I’d like to get my [putting] feel back.”
Henrik Stenson, Bubba Watson and Matt Kuchar are also able to overhaul Woods depending on their results, with Stenson needing a top-six finish, Watson to finish alone in second and Kuchar requiring a victory.