It was the 13th straight Davis Cup singles victory for Djokovic, who broke Nishioka's serve three times in the first set and twice in the second at the Caja Magica.
The winner of Thursday's series between Serbia and top-ranked France will guarantee a spot in the quarterfinals.
"It's probably one of the biggest challenges that we can have in this competition," said Djokovic, who hadn't played in the Davis Cup since 2017. "Playing against France, one of the most successful nations in Davis Cup, and definitely one of the strongest teams."
In the revamped Davis Cup format, teams play two singles and a doubles match, with the group winners advancing to the knockout stage along with the two best second-place finishers in the six groups.
Japan, which lost to France 2-1 on Tuesday, has no chance of advancing.
Germany can secure first place in the group if it beats Chile on Thursday. Argentina can still advance as a second-place finisher.
The new Davis Cup event is being played in World Cup style with all 18 teams playing in a single venue in the same week. The tournament overhaul is the result of a 25-year partnership between the International Tennis Federation and Kosmos, a group co-founded by Barcelona soccer player Gerard Pique.
It was the 26th straight Davis Cup singles victory for the top-ranked Nadal, who later got back on the court along with Marcel Granollers for a 6-3, 6-4 doubles victory over Ivan Dodig and Mate Pavic.
Spain opened with a 2-1 come-from-behind win over Russia on Tuesday.
Croatia was eliminated with the loss.
Australia defeated Belgium to win Group D and take on Canada in the tournament's first quarterfinal on Thursday.
The Associated Press contributed to this report.