Djokovic took almost three hours to beat the Italian 4-6, 6-3, 7-5, and will not be in Turin, where the ATP Finals begin on Sunday.
"I was really looking forward to competing in Turin and giving my best," Djokovic posted on social media.
"But after today's final in Athens, I'm sad to share that I need to withdraw due to an ongoing injury."
Djokovic also missed last year's season-ender with injury, having won his seventh title in 2023.
Musetti, who needed to beat Djokovic to overtake Canadian Felix Auger-Aliassime to qualify for the tournament, will replace Djokovic in the Jimmy Connors Group, with Alexander Bublik now the first alternate.
This marks the first time that two Italian singles players have qualified for the same edition of the ATP Finals, and it is Musetti's first appearance.
