Preheat oven to 350°F (175°C) and line a muffin tin with cupcake liners.
Melt butter over low heat, then stir in sugar until combined.
Add eggs one at a time, then mix in vanilla extract.
In a separate bowl, whisk flour, cocoa powder, salt, and espresso powder.
Gradually fold dry ingredients into the wet mixture.
Stir in milk until smooth.
Divide batter into liners, filling each about ⅔ full.
Bake for 18–20 minutes until set. Cool completely.