Top-ranked Nadal saved three set points and finally closed out a 20-minute tiebreak in the first set against Switzerland's Stanislas Wawrinka before winning 7-6 (10), 6-1.
Djokovic, the defending champion, needed nearly 2½ hours to rally past France's Gael Monfils 6-7 (4), 6-2, 6-4.
Djokovic and Nadal improved to a combined 20-0 record against the pair.
Tsonga next plays Djokovic, while del Potro meets Nadal.
If Djokovic and Nadal do meet in the final, it would be their 39th professional matchup -- and second in as many weeks. Djokovic defeated Nadal last Sunday in the China Open final in Beijing after the Spaniard was assured of retaking the No. 1 ranking from him.
Nadal had a lengthy first set against Wawrinka -- a player who had never taken a set off him in 10 matches.
After fending off three set points by Wawrinka, the Spaniard hit a cleverly disguised drop shot from the baseline to go up 11-10 in the tiebreak and finally managed to win it on his fourth set point with a forehand winner.
Djokovic looked out of sorts against Monfils. The Serb hadn't been broken in his two previous matches in Shanghai, but he dropped serve twice in the first three games.
"Inexplicably, I started serving quite bad, but not many unforced errors," he said. "It's just sometimes that you start off slowly and you're not feeling the ball as much."
Monfils played remarkable defense in the first set, sliding and stretching for every ball and forcing errors. At one point, Djokovic was so frustrated, he clenched his fists and let out a full-throttle scream.
"Today was a very physical match and very intense," he said. "I knew coming into the match that he's going to run for every ball and he's going to make me play an extra shot. Sometimes I was even surprised with the balls that he's getting back."
In the second set, it was Monfils' turn to get emotional. Down 3-1, he sprinted after a drop shot and did a split trying to reach it, falling on his back. After lying still for 15 seconds, he finally wandered back to the service line -- and received a time violation.
Monfils angrily questioned the umpire about the rule and berated him on the changeover. Then, a couple of games later, he began grimacing in pain and took an injury timeout to have a trainer massage his abdominal muscles. He never recovered, looking increasingly drained in the third set.
"It was really tough," said the Frenchman, who ousted Roger Federer in the third round. "I get a bit scared with my abs. It was tough for me to serve full bore. For sure, against Novak, it's impossible to win if not serving 100 percent."
Meanwhile, Del Potro and Tsonga each spent a little over an hour on the court.
Del Potro, the 2009 U.S. Open champion, moved back into the top five in the rankings on Monday for the first time in more than three years. He believes he's capable of challenging Nadal, Djokovic and Andy Murray for Grand Slam titles again.
A win in Shanghai would make a statement: He's never won a Masters title and he would have to get past Nadal and possibly Djokovic to do so.
"I felt close to them in some parts of the year, some matches during this year, like in Wimbledon (where he lost in a five-set semifinal to Djokovic), or when I beat Djokovic (and) Murray in Indian Wells," he said.
Tsonga is also on the comeback trail. He missed several months with a knee injury and also parted ways with his coach, Roger Rasheed, after less than a year. He's slipped to No. 9 in the rankings -- his lowest position in two years.
Tsonga believes he has a good shot against Djokovic, despite losing their past eight matches.
"I think he has lost more matches this year than the other years, so maybe it's an opportunity for me," Tsonga said.