The loss for the 24-time Grand Slam winner Djokovic was written to 6–7 (4–7), 2–6 and the match was over in just over an hour and a half.
The performance in Qatar was the Serbian's first since he was forced to withdraw from the semifinal in the Australian Open in January due to injury.
Berrettini is, however, no pushover. When Djokovic won Wimbledon in 2021, it was the Italian he defeated in the final and Berrettini has been ranked as high as number six in the world.
Last year, the 28-year-old was back in earnest after a longer injury and won three titles on the ATP tour. Now he beat Djokovic – who has won twice in Doha – for the first time in his career.