The world number one had not competed at the tournament since 2019 due to U.S. travel restrictions related to the COVID-19 pandemic and saw his hopes of winning a record sixth title dashed by the 123rd ranked lucky loser.
"He really didn't have anything to lose, so he played great. Deserved to win," Djokovic told reporters.
"I was more surprised with my level. My level was really, really bad.
"These two things come together. He's having a great day, I'm having a really bad day."
While Djokovic was uncharacteristically sloppy, Nardi was sharp, racing around the court and pounding serves and forehands to beat the 24-time Grand Slam champion he grew up idolizing.
"I made some really terrible unforced errors," Djokovic said.
"Just quite defensive tennis and not much on the ball in the third, and that's it. He just stepped in and he used the time that he had.
"He was playing more free and more aggressive than I did, and going for his shots and that break on 3-2 in the third was enough."
Djokovic, who lost to another Italian, Jannik Sinner, in the semi-finals of the Australian Open in January, said he would likely take the court in search of his first title of the year at the Miami Open later this month.
"No titles this year, that's not something I'm used to," he said.
"I was starting the season most of my career with a Grand Slam win or, you know, Dubai win, or any tournament," he said.
"I guess every trophy that eventually comes my way is going to be great, obviously to break the kind of negative cycle a little bit I'm having in the last three, four tournaments where I haven't really been close to my best."