Add the brown sugar, water, cinnamon, and optional nutmeg to a small saucepan. Heat over medium-low, stirring until the sugar completely dissolves.
Let the syrup gently simmer for 2 to 3 minutes until glossy and lightly thickened. Remove from the heat and stir in the vanilla extract.
Allow the syrup to cool for about 5 minutes while you brew two fresh shots of espresso.
Add 2 to 3 tablespoons of syrup to your serving mug, then pour in the espresso. Stir until the mixture looks smooth and evenly blended.
Heat the milk until hot but not boiling, then froth it until it becomes silky with small, creamy bubbles.
Slowly pour the steamed milk into the espresso mixture, holding back the foam with a spoon before topping the drink with the foam.
Sprinkle with a pinch of ground cinnamon if desired and serve immediately.
For an iced version, fill a glass with ice, combine the syrup and espresso, then pour in cold milk and stir gently before serving.