The 18-time grand slam champion, who has only one title to his name at Roland Garros, was somewhere close to his imperious best on Court Philippe Chatrier as world number nine Berrettini's run was halted in a 6-3 6-2 6-7 (5-7) 7-5 loss.
This is as far as the Italian has got in Paris but Djokovic was determined to let him go no further, the world number one having suffered a scare in the last round as he fell two sets behind to Lorenzo Musetti before Berrettini's compatriot retired hurt.
Djokovic's peerless returning ability was on full display, and will have to be again against the 'King of Clay' Nadal, as he negotiated a tricky test with relatively little fuss.
The Serbian showed laser-like precision off both wings, affording Berrettini precious few opportunities to apply any pressure at all across the first two sets.
Seeking to become only the second Italian player to defeat the French Open's number one seed after Adriano Panatta did so against Bjorn Borg in 1976, Berrettini could not find the answers to Djokovic's constant probing.
Like Djokovic, Berrettini was handed a walkover in the previous round after Roger Federer withdrew, although he did not have to even take to the court.
The third set offered some small hint that it may have given Berrettini an advantage in terms of freshness as he came through a hard-fought tie-break, fists pumping as he forced the contest late into the Parisian night, meaning the fans in attendance would not be able to see the match to its conclusion.
But a Djokovic break late into an hour-long fourth handed him the victory, prompting passionate, wide-eyed celebrations from the Serbian in the direction of his coaching team.