This post may contain affiliate links. Please read our disclosure policy.
My mocha cupcakes are a coffee lover’s dream. A moist chocolate-coffee cupcake has a hidden pocket of dark chocolate ganache in the center and is topped with a swirl of espresso buttercream. It’s a professional-quality cupcake that’s easy to make without special tools!

If you’ve noticed that most of my chocolate cakes call for a splash of hot coffee, this is the recipe where the coffee is meant to shine! These mocha cupcakes go all in: a full 1¼ cups of hot coffee mixed into the batter to bloom the cocoa and deepen the chocolate flavor. Then, espresso powder flavors the buttercream for a shot right on top. The part nobody expects is the spoonful of dark chocolate ganache tucked inside each one. Bite in, and there’s a molten center under that swirl of coffee frosting.
This is the cupcake version of my mocha cake, and it’s certain to win over any eater. I recently re-tested this recipe from top to bottom, and made some changes to streamline the method and make it more foolproof for all baking skill levels. I also doubled the buttercream, because the old amount frosted 12 cupcakes generously or 24 moderately, but I wanted enough for a generous swirl on all 24. The resulting recipe is achievable for even beginner bakers but looks and tastes so impressive!
“I made these for my daughter for her birthday and they were a huge hit! She loves going to Starbucks for a mocha so I was so happy when I found this recipe. Thank you for the clear instructions. I’m not the best baker, but these turned out fabulous. So light, tender, and delicious.”
Kerri

Why You’ll Love This Mocha Cupcake Recipe
This is one of the first recipes I posted on Preppy Kitchen, and I love the flavor and components, but after years of reader feedback, I decided to update it for you. My original version teetered right on the edge of too much leavener, which meant if you were new to baking, you might pull them too early and they would sink in the center. So, after retesting it again, I found that cutting the baking powder and baking soda back made slightly domed tops, a tender crumb, and a foolproof bake.
Here’s what’s to love about these new and improved cupcakes:
- Coffee makes the chocolate richer. Blooming the cocoa in hot coffee unlocks trapped flavor compounds in the cocoa that would otherwise stay dormant, so it tastes even more chocolatey.
- Moist and tender from sour cream and buttermilk. The fat and moisture from sour cream keep the cupcakes moist for days. As a bonus, the acidic nature of the cultured sour cream and buttermilk prevents gluten from forming very strong bonds, so the cupcakes turn out supremely tender.
- The batter stirs together in 10 minutes. You don’t need a mixer for the batter—it just whisks together in about 10 minutes! Cupcakes are also quick to bake (about 20 minutes), so this recipe doesn’t take much time.
Key Ingredients

These are the main ingredients you need to make mocha cupcakes. You can find the full list of ingredients and measurements in the recipe card below.
Hot coffee — this is the backbone of the mocha batter. When the coffee is hot, it blooms the cocoa powder, dissolving and intensifying its flavor, so the cupcakes taste chocolatey too, rather than just coffee-forward. Any coffee works as long as it’s strong (even a cold brew that’s heated up works great). If you’re serving these at night or to kids, decaf works just as well—the coffee is here for flavor, not caffeine.
Dutch-process cocoa — you don’t need much for the cupcakes (just a few tablespoons). The coffee and cocoa work together to intensify the flavor and get the most out of a small amount. Dutch-processed cocoa powder gives the cupcakes a darker color and smoother flavor. I also tested this recipe with natural cocoa powder, and it worked well, but the cupcakes domed slightly more. Dutch cocoa is less acidic than natural cocoa, so the baking soda will react with it more intensely. (Do not use black cocoa! It’s far less acidic than both, and your cupcakes will turn out a bit dense or sticky.)
Buttermilk + sour cream — the moisture and tenderness A-team! I recommend using whole buttermilk for the added fat content to make the cupcakes feel more moist. If you don’t have buttermilk, make my quick 2-ingredient buttermilk substitute instead of using plain milk—the acidity is what reduces strong gluten formation so the cupcakes bake up light and tender.
Vegetable oil — this liquid fat keeps the cupcakes soft rather than firming up once they cool. You can use butter for flavor if you’d like. Just keep in mind that butter solidifies when it cools, so the cupcakes will be a bit more firm, especially if refrigerated.
Instant espresso powder — this flavors the buttercream and is sifted together with the powdered sugar and cocoa so it disperses evenly with no gritty specks. Be sure your espresso powder is instant so that it dissolves! If not, your frosting will have a gritty quality from the ground coffee beans.
Chocolate chips + heavy cream — a simple, two-ingredient microwave ganache is used for the surprise filling. Dark chocolate chips (like semi-sweet) keep the center from being too sweet against the frosting, but you can use a different type of chocolate if you prefer.
Chocolate-covered espresso beans — this is an optional garnish, but it helps communicate the flavor before the first bite. Simply place one on top of each cupcake as the garnish. No beans? A drizzle of the leftover ganache over the frosting works too.
How To Make Mocha Cupcakes
Below, I’ve highlighted portions of the recipe in step-by-step process images along with instructions for making mocha cupcakes. You can find the full set of instructions in the recipe card below.

1. Sift together the dry ingredients. Sifting together the flour, sugar, cocoa powder, baking powder, baking soda, and salt ensures that all of the dry ingredients are well combined and catches any lumps. Cocoa is hygroscopic and absorbs moisture easily, causing it to form hard clumps. Those clumps don’t always dissolve well and can leave pockets of dry, bitter cocoa in your baked cupcakes if they aren’t sifted and dispersed.
2. Whisk the wet ingredients together. Once the buttermilk, oil, eggs, sour cream, and water are combined, add the hot coffee. Adding the coffee after the other ingredients are incorporated protects heat-sensitive ingredients like eggs from seizing when the hot coffee hits them. Whisk everything together well.

3. Combine the batter. Pour the wet mixture into the flour mixture and whisk together just until all of the dry streaks have disappeared. A few tiny lumps in the batter are okay, and they will dissolve during baking.
4. Divide and bake. Divide the batter among 24 paper cupcake liners (about ⅓ cup each). They will be very full. Bake at 350°F for about 20 minutes, swapping the pans between racks after 15 minutes. The cupcakes are done when a toothpick inserted into the center comes out clean. Let them cool in the pans for a few minutes, then completely on a wire rack.

5. Make the ganache filling. Combine the cream and chocolate chips in a bowl and microwave in short bursts until the chocolate is melted. Stir between each to prevent the chocolate from burning in any spot. The microwave makes this process easy, but you can also melt the chocolate and cream together in a double boiler if you’d rather.
6. Core and fill the cupcakes. Remove the center of each cupcake using an apple corer. You need to remove about 1 inch of the cake from the center to fill with ganache. Save the removed center. Fill the cavity with ganache, then trim the removed center and place the top of it over the ganache. This holds the filling in!

7. Frost the cupcakes. Make the frosting by beating the butter until it’s very fluffy and light in color (about 5 minutes). It’s a long time, but it makes the frosting very smooth! Be sure to sift the powdered sugar, cocoa powder, and espresso powder so it’s lump-free. Gradually beat it into the butter on low speed. Then add the vanilla and cream, beating until the frosting is smooth and pipable.
8. Pipe and decorate. Put the frosting in a piping bag with a large closed star tip, and pipe a swirl on top of each filled cupcake. Garnish the top with an espresso bean if you’d like.
Making the Ganache Center
To make the surprise filling in the cupcakes, you need to core the center of each cupcake. This is a pretty simple task, but there’s one thing to be cautious of: don’t core all the way through! You want to remove about 1 inch of the center and go about ½ to 1 inch into the cupcake only. If you go too far, the ganache will soak into the base of the cupcake and can make them fall apart easily or form soggy or sticky bottoms.
I tested coring the cupcakes with four different tools: an apple corer, the end of a piping tip, a pairing knife, and a special cupcake coring tool. They all worked, but the apple corer was my favorite! It was easy to use since I already had it in the drawer, and the saw-tooth edge helped cut through the cake without tearing it. If you don’t have one, the wide end of a piping tip is my go-to back-up! It works very similarly to the apple corer, and you can use the same tip you’ll use to frost the cupcakes, so you don’t need another tool.
Don’t forget the cap! Trimming the removed center makes a little top cover for the filling. This cap keeps the ganache from dissolving the frosting where they touch and gives the frosting a level base. (For a full walkthrough of coring and filling, see Academy: How to Fill Cupcakes.)

Pro Tips For The Best Mocha Cupcakes
Cool completely before coring and frosting. A warm cupcake crumbles when cored, and the warm crumb melts the buttercream, making it slide off.
Don’t skip sifting the espresso powder with the sugar. Espresso powder added straight to finished buttercream won’t fully dissolve because of the butter’s fat, and you’ll get speckles. Sifted in with the dry sugar, it disperses more evenly and slowly, and the added cream at the end helps to finish dissolving it. This is a version of my mocha frosting, which has step-by-step details for making the frosting.
Ganache too thick to spoon? Add a splash more cream and give it one more 15-second burst. Feel free to flavor the ganache too! Swap 2-3 tablespoons of the cream for brewed coffee, coffee liqueur, or a little bourbon for a grown-up center.
Storage & Make Ahead
Store the finished cupcakes in an airtight container for up to 5 days in the fridge. The ganache center and buttercream hold up best cold, but they will have the best texture if they are served closer to room temperature. Just let them sit out 20–30 minutes before serving so they soften.
Unfrosted cupcakes can be baked a day ahead and kept covered at room temperature, and both the buttercream and ganache can be made a day ahead and re-whipped or re-warmed when you’re ready to assemble.
Mocha Cupcakes Recipe

Equipment
- Stand mixer
- Mixing Bowls
- Two 12-cup cupcake tins
Ingredients
For the Cupcakes:
- 3 cups all-purpose flour (360g)
- 2⅔ cups granulated sugar (534g)
- 3 tablespoons Dutch-process cocoa powder (18g)
- 1 teaspoon salt
- 2 teaspoons baking soda
- 2 teaspoons baking powder
- 1 cup whole or low-fat buttermilk room temperature (240ml)
- ¾ cup vegetable oil (180ml)
- 3 large eggs room temperature
- ½ cup sour cream room temperature (120g)
- ½ cup water (120ml)
- 1¼ cups hot coffee (300ml)
For the Buttercream:
- 7½ cups powdered sugar (900g)
- 1 tablespoon Dutch-process cocoa powder
- 1 tablespoon instant espresso powder
- 2 cups unsalted butter room temperature (226g)
- ½ teaspoon salt
- 3 teaspoons vanilla extract
- 6 tablespoons heavy cream (90ml)
Filling & Assembly:
- ½ cup dark chocolate chips (90g)
- ⅓ cup heavy cream (80ml)
- 12 chocolate covered espresso beans (optional)
Instructions
For the Cupcakes:
- Arrange both oven racks towards the center of the oven and preheat the oven to 350ºF. Line two 12-cup cupcake pans with paper cupcake liners.
- To a large bowl sift in the flour, granulated sugar, cocoa powder, salt, baking powder and baking soda. Whisk and set aside.
- To another large bowl add the buttermilk, oil, eggs, sour cream, and water. Whisk until fully combined. While whisking, pour in the hot coffee. Add the wet ingredients into the flour mixture, and whisk until no dry streaks remain.
- Fill each cupcake liner until almost full (about ⅓ cup each). Bake for 15 minutes. Carefully swap the pans between the oven rack, and continue baking for another 5-8 minutes or until a toothpick inserted into the center comes out clean. Let the cupcakes cool in the pan for a couple of minutes, then carefully remove them and place them on a wire rack to cool completely.
For the Buttercream:
- In a large bowl sift together the powdered sugar, cocoa powder and espresso powder. Set aside.
- To the bowl of a stand mixer fitted with a paddle attachment or a large bowl with an electric hand mixer, beat the butter and salt on medium-high speed until lightened in color, very fluffy, and smooth, about 5 minutes.
- Reduce the speed to low and gradually add the powdered sugar mixture in 1 cup at a time. Once all the sugar is incorporated, increase speed to medium-low and add in the vanilla and heavy cream. Transfer the buttercream to a piping bag fitted with a closed star tip (Ateco 858.)
For the Filling & Assembly:
- To a small microwave safe bowl, combine the chocolate chips and heavy cream. Microwave in 30 second bursts, stirring in between each, until fully melted and smooth. Set it aside to cool slightly while you core the cupcakes.
- Once the cupcakes have fully cooled, use an apple corer or knife to remove the center of each cupcake being careful not to cut through to the bottom. (You only need to go about an inch deep.) Trim the bottom of the removed center leaving a half inch piece of the top.
- Fill each cupcake hole with 1 teaspoon of the ganache and top with the reserved cupcake centers. Pipe the buttercream on top of the cupcakes, and garnish with a chocolate covered espresso bean.
Notes
- If your cupcakes bake up wide, flat, or sink in the center, check your leavening measurement. I can tell you exactly what that issue looks like because I produced it in testing! With too much baking powder and soda, the batch rose fast, collapsed in the center, and set with a thin, crisp top. Excess leavening inflates the batter beyond what its structure can hold. Be sure to level off your teaspoons when measuring the leaveners.
- Don’t forget to swap the pans between oven racks. This helps them bake evenly since the heat doesn’t circulate as efficiently when both racks are full. Wait the full 15 minutes of bake time too, though. Moving them too soon can cause the delicate batter to collapse since the structure hasn’t set enough yet.
Nutrition
Have you tried this recipe? Tag me today!
Mention @preppykitchen and tag #preppykitchen!

Frequently Asked Questions
The cupcakes do have a coffee flavor! Most of the coffee flavor lives in the espresso buttercream on top, with it coming through some in the cupcake batter, but not as strongly. And yes: if you use decaf coffee and decaf instant espresso, the flavor is identical, so they’re safe for evenings and kids’ parties.
No. An apple corer, a small knife, or even a large piping tip pressed into the center all work. Core about an inch deep, keep a half-inch cap from the removed piece, fill with a teaspoon of ganache, and cap it before frosting.
Absolutely. A chocolate buttercream leans more chocolate than coffee-forward, and if you prefer a tangier frosting, my chocolate cream cheese frosting would also pair well with the cupcakes. For a silkier, less-sweet option, add the espresso powder dissolved in 1 tablespoon of warm water to a Swiss meringue buttercream at the end of mixing.
More Recipes to Try
Try one of my other popular cupcake recipes next:
- Tiramisu Cupcakes — another coffee-soaked favorite with mascarpone frosting for espresso lovers.
- Red Velvet Cupcakes — a light cocoa-kissed crumb with tangy cream cheese frosting; this is my most popular cupcake.
- Cookies and Cream Cupcakes — crunchy Oreo-loaded cupcakes with a cookie buttercream.
- Vanilla Cupcakes — my moist, from-scratch vanilla base that pairs with any frosting, including the espresso buttercream here.
- Chocolate Cupcakes — a similar cupcake but without the coffee for those true chocolate lovers.
If you’ve tried this mocha cupcake recipe, then don’t forget to rate it and let me know how you got on in the comments below. I love hearing from you!








