In a saucepan, combine the sugar, instant espresso, cocoa powder, sweetened condensed milk, and water.
Bring to a gentle simmer over medium-low heat for 10-15 minutes, stirring constantly to ensure everything is fully incorporated and to prevent burning or curdling.
Remove from the heat and stir in the vanilla extract and a pinch of salt.
Allow the syrup to cool completely before storing.
When refrigerated, it will keep for up to 3 weeks.