Preheat the oven to 350°F (177ºF). Spray a mini donut pan with nonstick cooking spray. Set aside.
In a medium bowl, whisk together the all-purpose flour, cocoa powder, baking powder, baking soda, salt, and espresso powder, if using. Set aside.
In a separate medium bowl, whisk together the egg, brown sugar, milk, and sour cream until smooth.
Add in the melted butter and vanilla, whisking until fully combined.
Pour the wet ingredients into the dry ingredients and mix until just combined. Do not over mix. The batter will be thick.
Add the batter to a piping bag or ziploc bag with ½ an inch of one corner cut off. Pipe the batter into the donut cavities, filling each about ½-⅔ of the way. Do not overfill.
Bake for 7-8 minutes or until the edges are just lightly browned. (For mini muffins, bake 9-10 minutes)
Allow to cool for about two minutes and turn out onto a wire rack set on a large piece of parchment paper or over a baking sheet.
Allow donuts to cool down a couple of minutes until you can handle them.