World No 3 McIlroy managed just two birdies in an opening 71 at Sheshan International on Thursday to trail by seven shots.
And although the four-time major winner carded seven birdies in a second round of 66, that was only good enough to reduce the deficit by a single shot thanks to a brilliant 65 from Matsuyama.
Matsuyama, who is a career-high 10th in the world after winning the Japan Open a fortnight ago and finishing second in the CIMB Classic last week, had 10 birdies and four bogeys in an opening 66 and added four more birdies and two bogeys in a front nine of 34.
The 24-year-old then started the back nine with a hat-trick of birdies and picked up further shots on the 14th and 18th to finish 13 under par, three shots ahead of American Bill Haas and defending champion Russell Knox.
England’s Richard Bland, Italy’s Francesco Molinari and American Daniel Berger were two shots further back, with McIlroy, Paul Casey and Ross Fisher on seven under alongside China’s Xinjun Zhang.
McIlroy said: “I felt like I hit the ball very similar the first two days, I was just able to capitalise on some of the good drives that I hit today and being able to hole a few more putts makes a big difference at the end of the day.
“I’ve been able to come back from six behind with 18 to play, so over 36 holes a lot of things can happen.
“Hideki’s playing very well and will be tough to catch, but from what I saw out there today, if I can keep that sort of golf going over the next two days I should have a chance.”
McIlroy is trying to match Henrik Stenson’s achievement of winning the FedEx Cup and Race to Dubai in the same season.
He started the week more than a million points behind Sheffield’s Danny Willett in the Race to Dubai.
Willett is eight over par, fully 15 shots behind McIlroy after a second successive day of toil in Shanghai. Friday’s round of 78 including three double bogeys.
Sheffield’s Matt Fitzpatrick shot a 74 and is two over.