Caroline Wozniacki, the women's top seed, beat Alisa Kleybanova 2-6, 6-3, 6-1 — a victory, along with Clijsters' departure, that ensured the Dane will retain her No 1 world ranking.
Federer defeated 29th-seeded Juan Ignacio Chela of Argentina 6-0, 6-2, and Djokovic routed Ernests Gulbis 6-0, 6-1 with temperatures reaching 32 degrees in the desert.
"Especially on a hot day like that, you pick the right days to play well and win quickly, so I'm happy it went so well," Federer said. "I was able to move him around. Then I was able to mix it up, and I took his options away a bit."
Federer is 16-2 this year, while Djokovic has dropped just three sets during his 14-0 start, including his run to the titles at the Australian Open and Dubai.
"I'm very, very focused. Nowadays, I'm feeling great on the court, and I'm motivated to have more success," Djokovic said. "So I just need to keep up, and that's what I'm trying to do."
Djokovic could knock Federer from the No 2 ranking this week if he reaches the final or he reaches the semi-finals and Federer loses before the quarter-finals.
Andy Roddick beat John Isner 7-5, 6-2 in an all-American night match, improving to 16-2 this year and making himself one of three US men still left. Maria Sharapova advanced to the quarter-finals with a 6-2, 6-0 win over fellow Russian Dinara Safina under the lights.
Ryan Harrison defeated Canadian Milos Raonic 7-6 (1), 4-6, 6-4 in a pairing of wild cards. For winning his first ATP Tour match this year, the 18-year-old American earned a matchup with Federer in the fourth-round.
Clijsters, a two-time champion, retired from her fourth-round match against 15th-seeded Marion Bartoli because of a right shoulder injury. She won the first set 6-3 and trailed 3-1 in the second when she left the court.
Clijsters' shoulder has bothered her since she won the Australian Open in January. She feels pain during her service motion and when she hits high forehands.
"Something is not the way it should be at the moment in this area, so I'm going to have to figure it out, going to have some tests done," she said. "I don't want to be in that position where I'm taking medication to cover the pain and not knowing if it's getting worse during my match."
Clijsters said she plans to fly to Miami for next week's tournament and receive treatment before her first match there. She wants to be fully healed for Belgium's upcoming Fed Cup matches and the clay court season.
She turns 28 in June and has been mostly injury-free since returning to tennis two year ago after retiring to get married and have a child.
"Makes me realise that I'm not the youngest one out there anymore and that I'm also probably not recovering as fast as in the past," Clijsters said.
Defending champion Jelena Jankovic lost to fellow Serb Ana Ivanovic 6-4, 6-2.
"Even when I was making mistakes, I didn't let myself get down for it," Ivanovic said. "I just tried to be persistent, so I'm really happy to have this kind of match."
She is struggling to regain the form that helped her win the 2008 French Open, with injuries and losses knocking her out of the top 20.
No 10 seed Shahar Peer outlasted fifth-seeded Francesca Schiavone 6-4, 3-6, 7-6 (3), and N. 8 Victoria Azarenka got by No 9 Agnieszka Radwanska, 4-6, 6-3, 7-6 (3).
Other men's winners were: No 7 seed Tomas Berdych, No 12 Stanislas Wawrinka and No 16 Viktor Troicki. No 10 Jurgen Melzer lost to Richard Gasquet, 6-1, 6-3.