Preheat your oven to 350 degrees F. and prepare a muffin tin by lining with cupcake liners and set aside.
In the bowl of a stand mixer equipped with a whisk attachment, add the flour, sugar, cocoa powder, baking powder, baking soda, salt, and espresso powder (if using), and whisk until combined.
In a large glass measuring cup, add the vegetable oil, egg, milk, and vanilla and whisk to combine. With the mixer on low speed, slowly pour in the wet ingredients until just combined.
Scrape the sides and bottom of the bowl.
With the mixer on low speed, carefully pour in the boiling water and mix on low until incorporated. Slowly increase the speed to high for 1-2 minutes.
Using a small cookie scoop, scoop the batter into the prepared cupcake liners.
Fill the liners about halfway full.
Bake the cupcakes for 10-13 minutes or until a toothpick inserted in the center of the cupcakes come out clean. Remove from the oven and allow to cool 10 minutes then transfer to a wire rack to cool completely.