Preheat oven to 350°F (175°C) and line a cupcake tray with liners.
Whisk flour, cocoa powder, baking powder, baking soda, and salt in a bowl.
In another bowl, beat butter and sugar until light and fluffy.
Add eggs one at a time, then mix in vanilla extract.
Alternate adding dry ingredients with milk and brewed coffee. Mix until smooth.
Fill cupcake liners ¾ full and bake for 18–20 minutes. Cool completely.
Mix brewed coffee with sugar to make coffee soak. Lightly brush over cooled cupcakes.
In a bowl, whip mascarpone until smooth.
In another bowl, whip cream and powdered sugar until soft peaks form.
Fold whipped cream into mascarpone and add vanilla and espresso.
Pipe tiramisu cream onto cooled cupcakes.
Dust with cocoa powder and top with chocolate shavings or cookie crumbs.