Prep: Preheat oven to 350°F (175°C). Line a 12-cup muffin pan with cupcake liners.
Mix the dry ingredients: In a large bowl, sift together flour, cocoa powder, baking soda, and salt. Add sugar and whisk to combine.
Mix the wet ingredients: In a separate bowl, whisk together egg, buttermilk, oil, and vanilla extract until smooth.
Combine the batter: Pour the wet ingredients into the dry ingredients and whisk just until combined. Slowly pour in the hot coffee and whisk until smooth. The batter will be thin; this is normal. Do not overmix.
Bake: Divide the batter evenly between the cupcake liners, filling each about ⅔ full. Bake for 18–20 minutes, or until a toothpick inserted into the center comes out clean. Allow to cool completely before filling and frosting.
Make the peanut caramel
Make the caramel: Place sugar in a medium saucepan over medium heat. Cook, stirring occasionally, until melted and deep amber in color. Remove from heat and carefully whisk in the warm heavy cream. Add butter and salt and whisk until smooth. Return to low heat and cook for 2–3 minutes, stirring frequently, until slightly thickened. Transfer to a heatproof bowl and reserve 3–4 tablespoons for decoration. Let cool slightly.
Make the peanut caramel filling: Stir the chopped peanuts into the remaining caramel and let cool completely.
Make the frosting
Make the frosting: In a large bowl, beat the butter and powdered sugar until light and fluffy, about 2–3 minutes. Add the peanut butter and cream cheese and beat until smooth. Add the vanilla extract and heavy cream and beat for 1–2 minutes, until light and creamy. Transfer to a piping bag.
Assemble and decorate
Assemble: Using a small knife or cupcake corer, cut a hole in the center of each cupcake. Fill with the peanut caramel, then pipe the frosting on top.
Decorate: Drizzle with melted chocolate or the reserved caramel sauce and sprinkle with chopped peanuts.
Video
Notes
Coffee: Use hot coffee, not cold. It enhances the chocolate flavor without making the cupcakes taste like coffee. You can use water instead, but I highly recommend using coffee.
No buttermilk? Use ½ cup milk mixed with 1½ teaspoons lemon juice or vinegar. Let it sit for 5–10 minutes before using. The buttermilk helps create a softer, more tender cupcake and adds a subtle tang that balances the sweetness.
Make ahead: Cupcakes can be baked 1 day in advance and stored covered at room temperature. Peanut caramel can be made up to 5 days ahead and refrigerated.
Storage: Store in an airtight container in the refrigerator for up to 4 days.