Preheat oven to 375°F. Line two muffin tins with cupcake liners and set aside.
Place the chopped dark chocolate and cocoa powder in a heat-safe bowl or measuring cup. Pour in the hot water or coffee and stir to combine. Set aside. In a large mixing bowl, whisk together the flour, baking soda, baking powder, salt, and instant espresso (if using), and set aside.
In the bowl of an electric mixer fitted with the paddle attachment (or a large mixing bowl and hand mixer), mix together the butter, granulated sugar, and brown sugar until combined, about 2 minutes. Add in the vanilla then the eggs, mixing in between each one until combined.
With the mixer on low speed, add in half of the flour mixture and mix until just incorporated (a few steaks of flour should remain). Add in the sour cream or buttermilk and mix to combine. Add in the remaining flour mixture and mix until just incorporated. Stop the mixer and scrape down the sides and bottom of the bowl.
Add in the chocolate mixture and mix until combined.
Using a mechanical ice cream scoop or disher, fill the cupcake liners between ⅔ and ¾ of the way full. Bake for 20 to 22 minutes, or until a toothpick inserted into the center of the cupcakes comes out clean or with a few crumbs. Completely cool the cupcakes on a wire rack before frosting.