Djokovic, who returns to Wimbledon after undergoing meniscus surgery on his right knee, defeated Fearnley 6-3, 6-4, 5-7, 7-5 in three hours and two minutes.
The Serb, who has won 24 majors, including seven on the London grass, where he is trying to equal Roger Federer's record, will face the winner of the match between Argentinian Tomas Martin Etcheverry, ranked 31st, and Australian Alexei Popyrin, ranked 47th, in the next round.
