The 40-year-old American opened with a bogey but recovered with seven pars to stand on 10-under 134 after 36 holes at the famed Orlando course where Palmer, the golfing legend who died last September, hosted the US PGA event for many years.
"If you get in the fairway you can sort of attack," Hoffman said. "The greens are surprisingly receptive. You can shoot at some of those pins that in the past you haven't and I was able to take advantage of it. A pretty solid round. I'm pretty happy. I hope I can keep it going the next few days."
Hoffman finished one stroke ahead of Argentina's Emiliano Grillo -- who had two eagles, two birdies and two bogeys in a round of 68 -- and two in front of Britain's Matthew Fitzpatrick, who had shared the 18-hole lead with Grillo.
Northern Ireland's McIlroy, preparing for his bid at a career Grand Slam in three weeks at the Masters, fired a 71 Friday to stand 11 adrift on 145.
McIlroy, a four-time major champion, opened on the back nine with back-to-back bogeys, sending his first tee shot way left and his second into a fairway bunker.
The world number three birdied the par-5 12th, sank a 30-foot eagle putt at the par-5 16th, then sent his tee shot at the par-3 16th into the water on the way to a double bogey.
McIlroy, 27, completed the roller-coaster opening nine with a nine-foot birdie putt at 18 before closing with eight pars and a birdie at the par-5 fourth.
World number two Jason Day of Australia was in a pack on 141 shooting 71 Friday, a nine-foot eagle putt at 16 his highlight.
Hoffman, at Bay Hill for the first time since 2013, seeks his fifth US PGA crown and his first since last April's Texas Open.
After his first-hole stumble when he was short of the green on his approach, Hoffman sank a 37-foot birdie putt at the fifth and birdied the par-5 sixth and par-4 ninth. He birdied the 11th, dropped a 32-foot birdie putt at 13, added another birdie at 16 and birdied 18 for the second day in a row, hitting a 10-foot putt to end his round.
"It's playing good and you can make some putts," Hoffman said. "But I expect it's going to firm up this weekend."
- 'He paved the way for all of us' -
Hoffman also paid tribute to Palmer, whose memory lingers this week after decades as the US face of golf, making the sport popular on television and becoming a sports marketing pioneer in the process.
"He was what we all wanted to be, a favorite of the fans," Hoffman said. "He paved the way for all of us."
Grillo, who started on the back nine, holed out from 35 yards on a bunker shot to eagle the par-5 12th and four holes later sank a 25-foot shot from off the green for another eagle.
Fitzpatrick, a 22-year-old Englishman, sank a 25-foot birdie putt at the 10th and closed with back-to-back birdies to stay on Hoffman's heels.
"It was a good day," Fitzpatrick said. "I didn't feel quite as in control of the golf ball as I did yesterday but I made a couple of good putts coming in and made a good score."