Johnson birdied his first three holes to set a strong base for a seven-under-par 64 second round on the Monterey Peninsula course, one of three used for the event.
Fellow American Beau Hossler, a PGA Tour rookie, had a bogey-free 67 at Spyglass Hill, joining Johnson at 12-under, though Johnson has a lower total, 131 against Hossler's 132.
Monterey Peninsula is a par-71, while Spyglass and the host Pebble Beach courses are par-72 layouts.
McIlroy, meanwhile, has some work ahead to make the 54-hole cut after a 74 at Monterey that included a staggering double-bogey at the par-four fifth.
After almost driving the green, the Northern Irishman used his putter from the fringe and stroked the ball to within six feet of the cup, from where he took four putts and probably ended his hopes in the tournament in a matter of seconds.
He is at one-under heading to his third round at Pebble.
Johnson, who won the opening event of the year at Kapalua in Hawaii on a course that suited his long-hitting game, said his form is close to where it was at this stage last year, when he was about to embark on a stretch of three successive victories.
"I don't know if it's quite as good as it was during that stretch," he said.
"That was probably some of the best golf I've played in my career, but parts of the game are just as good.
"I would say that I'm driving it well, but I'm probably not quite as good as I was when on those three wins, but everything else feels like it's really good."
World number two Rahm, playing for the fourth consecutive week, used a four-iron approach shot in the par-five sixth to set up a two-putt birdie and get his round at Pebble Beach going.
"Hasn't been a great year on par-fives," said Rahm. "I have had a lot of frustration but it all went away when I hit those two shots into six.
"I'm going to take a couple of weeks off after this and make sure I'm rested for the big events coming up."
(Reporting by Andrew Both in Adelaide, South Australia; Editing by Greg Stutchbury)