Reports had speculated that Troicki was his new coach as he was seen alongside Djokovic during a Tuesday practice session at Roland Garros, where the Serb trained with Alexander Zverev.
The move comes after Troicki helped guide the former world number one to Olympic gold in 2024.
"Welcome my friend, teammate and now coach... Viktor Troicki," Djokovic wrote on Instagram.
A former world number 12 and Serbia's Davis Cup captain, Troicki was part of Djokovic's coaching team at the 2024 Olympics, where the Serb won a historic gold medal in Paris.
Djokovic and Troicki are long-time friends dating back to childhood.
Djokovic, who turns 39 on Friday, is set for his 22nd appearance at the French Open, which he has won three times.
However, he has played just three tournaments this year and lost his only match on clay at the Italian Open in Rome.
