Australian left-hander O'Hern, still seeking his first PGA Tour title since joining the circuit in 2005, carded a second successive three-under-par 67 on a tricky day for scoring at the wind-swept TPC Southwind.
"My front nine today I did not play very well at all," O'Hern, who parred his opening 10 holes, said. "I was glad to hang in there all that time.
"Finally something happened and made some birdies coming home. That's kind of the name of the game is to not give up, I guess."
O'Hern rattled up three consecutive birdies from the par-three 14th to finish at six-under 204, level with US Ryder Cup captain Davis Love III (68) and his fellow American John Merrick (69).
US Open champion McIlroy, who led by one shot overnight, ended the day by sinking a 13-foot birdie putt on the 18th green for a 72 and a six-way share of fourth place at five under.
O'Hern, best known in the United States for twice beating Tiger Woods in the early rounds of the WGC-Accenture Match Play Championship, was preparing for a shootout in Sunday's final round.
"Lot of good players out there, it's going to take a good round tomorrow," the 40-year-old said of a tightly bunched leaderboard.
"The wind is a big factor on this golf course. It's not long, but that's the beauty of golf courses when they have a bit of wind and also firm greens. Make the greens firmer, the scores will go up."
McIlroy, who had missed the cut in his previous three tournaments, was happy to remain in contention after a roller-coaster round featuring six bogeys and four birdies.
"It was a very testing day with the conditions," said the Northern Irishman, who defends his US Open crown in San Francisco next week. "I definitely didn't feel as comfortable with my game as I did yesterday.
"But it was a good experience for me to put what I've been working on in my swing into real competitive pressure. For the most part, it held up pretty well but there were a few loose shots out there."