The 2015 champion at St Andrews picked up four birdies, including one on the last, to move to six-under-par, one clear of overnight leader Kevin Kisner and Englishman Tommy Fleetwood, who shot up the leaderboard with a six-under-par 65.
Fleetwood, who set a course record 63 at last year's Alfred Dunhill Links, said: "It's no course record but it will do for today".
Elsewhere, defending champion Jordan Spieth managed a second-round 67 to climb to three-under for the tournament.
"I have put myself back in the tournament and I've just got to try to keep doing the same things".
TOMMY FLEETWOOD, bidding to become the first English golfer to triumph at The Open, the oldest Major, since Nick Faldo's victory in 1992 at Muirfield.
"If I could pick one tournament in my life to win it would be The Open", Fleetwood said.
"I've never been anywhere near before", said Fleetwood, who has a liking for Carnoustie having set a course record 63 here in October past year.
"But, yes, it would be something to have in my career that would be awesome".
The Englishman fired in six birdies and no bogeys on a faultless second day at Carnoustie. He then birdied the 11th and tapped in a three-footer to gain another stroke on the 14th. I was surprised there was a couple of holes where I thought I'd hit shots that were going to end up in a fairway bunker or close to it, and they were a good bit short of that. It has felt, I don't want to say easy, but it's felt comfortable.
"And then with it being wet, with the ball being wet and the club face, the possibility of that getting wet, you know, the spin rate goes right on on the driver, and it could start to go either way".
"I never felt at ease all day".
"I thought I had the golf ball a bit more under control today", McIlroy said. An early tee time on Thursday meant that the 27-year-old could spend some time on the range to make tweaks to his technique that paid off in a major way as the shots kept dropping off in the rain and wind of day two.
The Northern Irishman, seeking a first major win since 2014, is four under par after two rounds of 69 and feels the best is yet to come. "I think last year was definitely a bit more hard than this year in terms of expectation not coming very quickly for me, struggling with my game, and that was a home Open Championship".