Major hip surgery and an ankle injury derailed Nishikori’s career after he made three major quarter-finals in 2019 – the year in which he last won an ATP title.
A shoulder issue forced the world number four to retire injured in the French Open second round last year before he lost in the first round at Wimbledon.
“I wanted to play [again] in a big stadium like today,” Nishikori said.
“That was my goal a year ago when I was doing rehab. I still think I have the chance to play with these top players.”
Nishikori had to save two match points in the second set before taking advantage as his opponent struggled with injury.
“I almost gave up at match point. But I somehow fought through,” said Nishikori, who plays American 12th seed Tommy Paul or Australia’s Chris O’Connell next.
“He deserved to win today but somehow I fought through.”
Norwegian sixth seed Casper Ruud avoided becoming the first top-10 casualty at this year’s Australian Open by coming through in five sets against Spain’s Jaume Munar.
The 26-year-old, a three-time Slam runner-up, won 6-3 1-6 7-5 2-6 6-1.