Preheat your oven to 350°F (175°C). Line two 12-count muffin tins with paper liners in preparation for baking the cupcakes. Set the tins aside so they're ready for the batter.
In a large bowl, combine the cake mix, instant chocolate pudding mix, sour cream, water, vegetable oil, eggs, and espresso powder (if you're using it). Mix the ingredients together until the batter is smooth and fully combined. I like to use espresso powder here; it really brings out the chocolate flavor!
Scoop the batter into the prepared cupcake liners, filling each about 3/4 of the way full. Place the tins in the preheated oven and bake for about 15 minutes, or until a toothpick inserted in the center of a cupcake comes out clean. Once baked, remove the cupcakes from the tin and let them cool completely on a wire rack before decorating.
Fit a piping bag with a large round piping tip. Fill the bag with the vanilla buttercream frosting, making sure it's ready for decorating the cooled cupcakes.
Pipe a generous, tall dome of vanilla buttercream onto each cooled cupcake. Don’t worry about making the frosting perfect—imperfect ghosts give each cupcake a fun, unique personality!
Using a small round piping tip fitted to a piping bag with black decorating icing, pipe small eyes directly onto the domes of buttercream, creating simple ghost faces on each cupcake.