World number one Djokovic, who beat Roger Federer in five sets in last month's Wimbledon final, needed almost two and three-quarter hours to extend his winning run to 10 matches as he beat Frenchman Gael Monfils, with the top seed reaching the third round after a 6-2, 6-7 (4/7), 7-6 (7/2) victory.
Britain's 2013 Wimbledon winner Murray made light of an absence from the ATP Tour of over a month to defeat promising Aussie teenager Nick Kyrgios 6-2, 6-2 in less than an hour.
Djokovic, married last month, was playing for the first time since his All England Club triumph.
"I tried to take the positives from this long match, obviously the fact that I stayed over two and a half hours on the court and I have not played an official hard court match since Miami finals (in March)," Djokovic said.
"That obviously helps to play a little bit more, to feel the court, to feel the conditions. I'm not feeling tired. I'm not exhausted. I haven't played a tournament for four weeks. I of course look forward to compete more."
The Serb did have to struggle with the flashy Monfils, who put the Serbian under pressure with a break in the third set for a 3-1 lead.
The top seed got the break back a game later but showed his frustration as Monfils won a nine-minute 11th game, saving three break points to hold for 6-5.
Monfils was two points from completing the upset at 6-5 30-30, but Djokovic held on to force the tiebreaker in which he seized a 5-2 lead and converted on his first match point with a forehand winner.
He goes through to a meeting with French 13th seed Jo-Wilfried Tsonga, who beat countryman Jeremy Chardy 7-6 (8/6), 6-4.
"I showed good stuff today, I think I was happy," said Monfils. "This can just motivate me to work harder. Next time I will try to maybe be a bit further (along) and maybe beat him."
Djokovic is bidding to become the third player, after Federer and Nadal, to win at least 20 Masters 1000 titles. He has claimed five of the last six he has contested.
- Murray's work paying off -
Murray, the eighth seed who won the Canadian title in 2009 and 2010, had been seen as a potential scalp for the dangerous Kyrgios since losing to Bulgarian Grigor Dimitrov in the Wimbledon quarter-finals.
In the interim, the disappointed 27-year-old Scot left for his training base in Miami to try and rediscover his best form, which had eluded him since back surgery in September.
He also signed former top French WTA player Amelie Mauresmo to a long-term coaching contract after an experimental period through the grasscourt season.
"I was just lacking a little bit," Murray said. "But after Wimbledon, I went over to Miami and I really trained like I used to for the first time since the surgery and I felt much better."
Murray showed that his work was starting to pay off, as he hammered Kyrgios, who upset Rafael Nadal in the fourth round at Wimbledon.
Eighth seed Murray, who has not won a title in the 13 months since lifting the Wimbledon trophy, will next face 12th seed Richard Gasquet, a winner over Ivo Karlovic 5-7, 7-6 (7/5), 6-3.
Another Frenchman Julien Benneteau moved into the third-round as he defeated 11th seed Ernests Gulbis 7-6 (7/4), 6-3. Spanish fifth seed David Ferrer beat Michael Russell 6-4, 2-6, 6-1
Sixth seed Milos Raonic fulfilled home hopes with his defeat of American Jack Sock 4-6, 7-6 (7/2), 7-6 (7/4), which took almost two and a half hours and ended with 16 aces for the winner. Number seven Grigor Dimitrov stopped Donald Young 4-6, 6-2, 6-3.
The 15th seed Marin Cilic came back to eliminate Tunisian Malek Jaziri 4-6, 6-0, 7-6 (7/4) while South Africa's Kevin Anderson beat Italian 16th seed Fabio Fognini 7-5, 6-2.
- Sports & Recreation
- Novak Djokovic
- Andy Murray
- Gael Monfils
- Roger Federer