Defending champion and top seed Djokovic reached the third round with a 6-4, 6-2, 6-3 victory over Jarkko Nieminen which brought down the curtain on the Finn's All England Club career.
Djokovic will take on Australian 27th seed Bernard Tomic for a place in the last 16 as the Serb continues his bid to win a third Wimbledon and ninth Grand Slam crown.
It was Djokovic's sixth career win in seven meetings against the 33-year-old Nieminen and the two men exchanged a warm embrace at the net once their 92-minute Centre Court duel had ended.
"He's been around for many years and he's one of the nicest guys off the court and a great fighter on it. It was a pleasure to play him."
Also Read
Tomic made the third round by defeating Pierre-Hugues Herbert of France, 7-6 (7/3), 6-4, 7-6 (7/5)
Fourth seeded Sharapova, the 2004 champion, outclassed Dutch qualifier Richel Hogenkamp 6-3, 6-1 in just over an hour and next faces Romanian 29th seed Irina-Camelia Begu.
Sharapova, 28, hit 23 winners as she booked her place in the third round.
That allows a 10-minute break between the second and third sets although the rule does not apply to men.
However, Djokovic, who has played in 40 degrees at the Australian Open, said: "It wasn't as bad as I thought. People were talking about it and predicting really difficult conditions. But I didn't find it as difficult as I thought it might be.