The Swiss great, seeded second at Flushing Meadows behind defending champion and world number one Rafael Nadal, improved his perfect record in US Open first-round matches with his 18th win in 18 attempts.
As the opening attraction of the night session on Arthur Ashe Stadium, Federer escaped the worst of hot, humid conditions that punished players earlier in the day.
Nor did he meet much resistance from Nishioka, who was ranked 58th in the world last March before tearing a left knee ligament and sliding out of the top 150.
After rolling through the first two sets with the loss of just four games, Federer cruised to a 4-0 lead in the third. Up 5-1, he was unable to close out the match against Nishioka's serve, and then was broken on his first attempt to serve it out himself.
Federer, who claimed is 20th Grand Slam title at the Australian Open in January, would put the match away two games later, finally sealing the win with a service winner.
“I'm very happy to be back in New York healthy,” said Federer, who claimed five straight US Open titles from 2004–2008 but missed the 2016 edition and only made it to the quarter-finals last year.
He next faces France's Benoit Paire, a 7-6 (8/6), 3-6, 7-5, 7-6 (7/5) winner over Austrian qualifier Dennis Novak.