Preheat Oven: Preheat the oven to 300°F (148°C) and line a 12-cup cupcake pan with liners.
Mix Dry Ingredients: In a large mixing bowl, whisk together flour, sugar, cocoa powder, baking soda, and salt. Set aside.
Mix Wet Ingredients: In another bowl, whisk together egg, milk (or buttermilk), vegetable oil, and vanilla extract.
Combine Wet and Dry Ingredients: Add the wet ingredients to the dry ingredients and mix until just combined.
Add Hot Water: Add hot water to the batter. It will be thin but don’t worry—this creates the moist texture.
Fill and Bake: Spoon the batter into the cupcake liners, filling them halfway. Bake for 18-23 minutes, or until a toothpick comes out with a few moist crumbs. Allow the cupcakes to cool for 2 minutes in the pan before transferring to a cooling rack.
Make the Frosting: Beat the butter until smooth. Add the melted chocolate and cocoa powder, mixing until combined. Gradually add the powdered sugar and mix. Add heavy cream as needed to achieve a smooth, pipeable consistency.
Decorate: Pipe the frosting onto the cooled cupcakes.