Position a rack in the lower third of the oven and heat the oven to 350°F. Line 12 standard-size muffin cups with paper liners.
Put the unsweetened chocolate in the top of a double boiler or in a metal bowl set over a small saucepan of barely simmering water. Stir occasionally until the chocolate is melted and smooth. Set aside to cool slightly.
Sift the flour, baking soda, and salt into a small bowl. In a large bowl, beat the butter with a stand mixer fitted with the paddle attachment (or a hand mixer) on medium speed until the butter is smooth, 30 to 60 seconds. With the mixer running, slowly pour in the sugar. Stop the mixer, scrape the bowl and beaters, and then beat on medium-high speed until the mixture is light and fluffy, 2 to 3 min. Beat in the eggs, one at a time, on medium speed, beating until the batter is smooth after each addition (about 30 seconds). Scrape the bowl after each addition. Add the vanilla and melted chocolate (which may be slightly warm) and beat until smooth and blended. On low speed, add the dry ingredients in three installments, alternating with the espresso in two additions, mixing after each addition only until the batter is smooth. Stir in the chocolate chips by hand.
Divide the batter evenly among the prepared muffin cups. (Use two rounded soupspoons: one to pick up the batter, one to push it off.) Don’t smooth the batter. Bake until the cupcakes spring back when gently pressed in the center, 20 to 22 min. Let them cool in the tin for 5 min. on a wire rack. Carefully remove the cupcakes from the tin, set them on the rack, and let cool completely.
Put a generous spoonful of the frosting on top of each cupcake and use the back of the spoon to spread and swirl it. Let the frosting set for about 30 min. before serving.