Both former Major Champions had left themselves with work to do on Friday after opening scores of 74 and 79 respectively at Royal Portrush
McIlroy looked out of it when he started on eight over par. But in front of a supportive home crowd, the 2014 Open Champion produced the best second round Major score of his career.
His 65 was the joint best round of the week so far and was a full 14 shots better than he managed on day one.
McIlroy said: "I'm unbelievably proud of how I handled myself today coming back after what was a very challenging day yesterday, and just full of gratitude towards every single one of the people that followed me to the very end and was willing me on.
"Today was probably one of the most fun rounds of golf I've ever played.
"I'll probably rue the finish yesterday, dropping five shots on the last three holes.
"But I felt like I gave a good account of myself today and I can leave here with my head held high.
"I will look back on this day with nothing but fond memories and positivity."
A birdie on the par three third got the crowd going and he picked up another shot on the seventh as he went out in 34.
What followed whipped up a frenzy at Royal Portrush as he reeled off three successive birdies to move to three over, with the cut line projected at one over.
I can leave here with my head held high. Rory McIlroy
He found the sand on the 13th and picked up his first bogey of the day but immediately bounced back with a birdie on the 14th.
McIlroy then birdied the par three 16th to leave himself one shot off making the weekend with two holes to play.
He had a birdie chance on the 17th but pulled his shot up to the left. Then his approach to the 18th veered off in the wind and he was left needing to chip in to make the weekend.
McIlroy left his chip within five feet and had to settle for a par, but the partisan crowd gave him a huge ovation following a stunning round.
Molinari, who lifted the trophy at Carnoustie 12 months ago, was a picture of consistency in his second round. He started with six straight pars before recording back-to-back birdies.
Another gain followed on the 11th and five more pars followed before he dropped his first shot of the day on the 17th.
Had he followed it up with another bogey on the last he would have been heading home, but the 36-year-old kept calm and went close to another birdie before tapping in for par.
Molinari sits nine shots off the lead but will take inspiration from the fact that 23 of the last 24 Major Champions were inside the top ten after 36 holes, with the lone exception being the Italian himself at last year's Open.
Gary Woodland, who won the U.S. Open last month, also missed the cut as he finished on three over alongside former Open Champions Darren Clarke and Padraig Harrington.
It was also the first time in Major history both Tiger Woods and Phil Mickelson missed the same cut.