(CNN) -- Some athletes respond to a proverbial kick up the backside, but Rory McIlroy seems to have found inspiration from the prick of a cactus thorn.
The Northern Irishman canceled a humanitarian trip to Haiti to play in this week's Texas Open, hoping to rediscover his form ahead of next week's Masters.
The two-time major winner added San Antonio to his Augusta buildup after registering just one top-10 finish since signing a lucrative deal with Nike in January which could be worth as much as $250 million, and losing the top ranking to Tiger Woods.
While Thursday's first-round 72 left him five strokes off the lead, McIlroy roared back with a five-under-par 67 that left him two off the halfway pace.
The world No. 2 had a mixed opening few holes, and he dropped his second shot of Friday's second round following a close encounter with a flower of the desert on the ninth fairway.
"I shouldn't have been there anyways, so I guess it was deserved, getting a -- whatever it was -- off the cactus," McIlroy said on the PGA Tour website.
The 23-year-old responded with a birdie at 11, and three more at the last three holes to end the day tied for fifth and in sight of pacesetter Billy Horschel.
"I definitely feel like I made the right decision to come here, and even if I hadn't been in this position and have been a few shots back I'd still feel the same way," McIlroy said. "I haven't really been in contention this year. So it will be nice to get into the mix."
While his shotmaking has been erratic at times, McIlroy's long game is in fine shape.
He managed to get to the green in two at the par-five eighth and 18th -- the latter after a 325-yard tee shot -- though he missed eagle putts at both.
"I think that shows where my game is," McIlroy said. "Those two par-fives are probably the toughest to hit in two with how small the greens are. It shows that my ball-striking is there. If I can keep hitting shots like that into par-fives, I'll be doing OK."
McIlroy tied for 45th at last week's Houston Open, where Horschel was joint second behind D.A. Points.
The American closed with two birdies to sign for a 68 and take a handy lead over compatriots Daniel Summerhays (69) and Charley Hoffman (67) as well as Australia's Steven Bowditch (69).
Two-time major winner John Daly missed the halfway cut by one shot after following up his 76 with 70, finishing birdie-bogey-birdie.