Preheat the oven to 350°F.
In a large mixing bowl, combine the cake mix, cocoa powder, sour cream, Kahlua, vegetable oil, eggs, and vanilla and mix until the batter is thoroughly combined. I suggest using a spatula and turning the batter over from the bottom to the top to make sure the oils are well mixed.
Line two 12-cavity muffins pans with liners. Divide the cupcake batter evenly for each cupcake.
Bake the cupcakes at 350°F for 15-18 minutes. To see if your cupcakes are done, insert a toothpick into the center of the cupcake. If the toothpick comes out clean, your cupcakes are done.
Allow the cupcakes to cool in the pan for 10-15 minutes and then transfer to a wire rack and cool completely.
In a small bowl, mix the boiling water and the instant espresso powder. If you don’t want to make the instant espresso, then you can use a strong brewed coffee.
In a large mixing bowl, whip the butter for 3-4 minutes until it is fluffy and well whipped.
Slowly add the powdered sugar 2 cups at a time. I suggest reducing the mixer speed so the powdered sugar does not fly everywhere. Once incorporated, increase the mixing speed to medium-high and beat for 30 seconds.
As you are adding the powdered sugar, the frosting will become thick and crumbly. Alternate adding the brewed espresso and Kahlua in between the cups of powdered sugar. At this point you should also be alternating in the cocoa powder.
Once all of the ingredients have been added, beat at a high speed for 60 seconds until the frosting becomes nice and light.
Pipe the frosting onto the cooled cupcakes.