Cakes

Blueberry Chocolate Layer Cake Recipe

Updated · By Peasy Recipe

Total timeprep + cook
1 hr 20 min
Prep
45 min
hands-on
Cook
35 min
oven or stovetop
Serves
8
as written

Save

A rich chocolate cake layered with fresh blueberries and chocolate frosting tastes like a cross between a chocolate fondant and a berry trifle. It suits occasions where you want a showstopper dessert that is simple to make ahead—ideal for holidays, birthday celebrations, or a home-baked gift. The blueberries add juicy pockets of flavor, while the chocolate layers provide deep richness; omitting the berries makes it a simple chocolate cake, but the contrast keeps it impressive.

Ingredients and Substitutions

This cake uses two main flavor layers: chocolate cake and blueberry filling. Substitutions work best if you stick to the same type of ingredient. If you cannot find fresh blueberries, use frozen blueberries (thawed, drained, and patted dry—do not defrost in microwave; let sit at room temperature for 15 minutes to avoid excess liquid). For cocoa powder, Dutch-processed is preferred for a smoother flavor, but natural cocoa adds more bitterness. If you see a recipe calling for “cocoa” without specification, assume it is natural unless stated otherwise.

  • For the cake:
    • 1 ½ cups (190 g) all-purpose flour, sifted
    • 1 cup (120 g) unsweetened cocoa powder (Dutch-process preferred)
    • 1 ½ tsp baking powder
    • 1 ½ tsp baking soda
    • ½ tsp salt
    • ½ cup (115 g) unsalted butter, softened
    • 1 cup (200 g) granulated sugar
    • 2 large eggs, room temperature
    • 1 tbsp (15 ml) vanilla extract
    • 1 cup (240 ml) buttermilk, room temperature
  • For the blueberry filling:
    • 2 cups (300 g) fresh or frozen blueberries (see note above)
    • ¼ cup (50 g) granulated sugar
    • 1 tbsp (7 g) all-purpose flour
    • 1 tsp lemon juice
  • For the chocolate frosting:
    • 1 cup (230 g) unsalted butter, softened
    • 4 cups (480 g) powdered sugar, sifted
    • ½ cup (120 g) unsweetened cocoa powder
    • ½ cup (120 ml) whole milk or heavy cream
    • 1 tsp vanilla extract
    • Pinch of salt

What Makes This Cake Different

Most chocolate cakes use cocoa mixed into the batter, but this recipe creates layers by baking the cake and spreading blueberry filling and chocolate frosting between them. The process makes the cake more complex but worth the effort—each bite has chocolate cake, juicy berries, and a velvety frosting. If you want a simpler cake, skip the filling and frosting, but the texture will be denser. For a gluten-free version, replace the flour and all-purpose flour blend with 1 ½ cups (180 g) gluten-free 1:1 baking flour and add 1 extra egg white for structure.

Equipment You Need

You will need a 9-inch (23 cm) round cake pan, a 9×13-inch (23×33 cm) baking dish for the filling, an electric mixer or sturdy whisk, and a rubber spatula. A piping bag is optional for decorating the frosting, but a knife works fine for spreading.

Layering the Cake for Maximum Flavor

The secret to this cake is keeping all layers moist and evenly distributed. Preheat the oven to 350°F (175°C) and line the cake pan and the baking dish with parchment paper. Grease all surfaces lightly with butter or nonstick spray. Bake the cake in the round pan first. After it cools, spread the blueberry filling on the cut surface, then layer the frosting on top before stacking another cake layer. If you want to add a final chocolate layer, spread frosting on the outside of the cake before decorating.

How to Cut the Cake Evenly

Use a serrated knife and a ruler to mark the cake into thirds before cutting each layer. Dip the knife in hot water and wipe it dry between cuts to ensure clean slices. If the cake is too warm, the knife may drag through the filling and frosting.

Step-by-Step: Cake and Filling

  1. Preheat the oven to 350°F (175°C). Line a 9-inch (23 cm) round cake pan and a 9×13-inch (23×33 cm) baking dish with parchment paper, and grease both lightly.
  2. Mix the dry ingredients: in a medium bowl, whisk together the flour, cocoa powder, baking powder, baking soda, and salt. Set aside.
  3. Cream the butter and sugar: in a large bowl, beat the softened butter and granulated sugar together until light and fluffy (about 3 minutes with an electric mixer). Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract.
  4. Combine wet and dry: add the dry ingredients to the butter mixture in three parts, alternating with the buttermilk. Start and end with the dry ingredients. Mix until just combined—do not overmix.
  5. Bake the cake: pour the batter into the prepared cake pan and spread it evenly. Bake for 25–30 minutes, until a toothpick inserted in the center comes out with a few moist crumbs (not wet batter). Rotate the pan halfway through baking for even browning.
  6. Prepare the blueberry filling: while the cake bakes, toss the blueberries, sugar, flour, and lemon juice in a bowl. Spread the mixture evenly in the prepared 9×13-inch baking dish. Bake for 20–25 minutes, until the berries are bubbling and the filling is thickened. Reduce heat to 325°F (160°C) if the filling browns too quickly.
  7. Cool both the cake and the filling: let the cake cool in the pan for 10 minutes, then transfer it to a wire rack. Cool the filling in the pan for 10 minutes, then transfer it to a plate to cool completely.

Chocolate Frosting: The Key to a Perfect Layer

The frosting should be thick enough to hold its shape but soft enough to spread easily. If it is too stiff, keep it in the refrigerator for 10 minutes before spreading. If it is too runny, add more powdered sugar or refrigerate for 5–10 minutes.

  1. Make the frosting: in a large bowl, beat the softened butter until creamy. Gradually add the powdered sugar, cocoa powder, and salt, mixing at low speed to avoid a mess. Add the vanilla extract and milk or cream, then beat on high speed for 2–3 minutes until smooth and fluffy.
  2. Adjust the consistency: if the frosting is too thick, add 1 tsp (5 ml) of milk at a time until it is spreadable but holds its shape. If it is too thin, add 1 tbsp (15 g) of powdered sugar at a time.

Assembling the Cake

Work on a clean surface or countertop. Place the cooled cake on a serving plate, then spread half of the blueberry filling evenly over the top. Spread half of the frosting on top of the filling, then place the second cake layer (if using) on top. Spread the remaining filling and frosting, then decorate with piped frosting or extra blueberries if desired.

How to Stack Layers Without Mess

If you are making two layers, cut the first cake in half horizontally using a serrated knife. Place the bottom half on a plate and spread half the filling and frosting on it. Place the top half on top and press gently. If the cake is too warm, it may stick to the frosting; let it cool completely before stacking.

Make-Ahead Timeline

This cake tastes even better the next day because the layers meld together. Make it up to 2 days ahead and store it covered at room temperature. If the frosting softens, let it sit at room temperature for 15–20 minutes to return to a spreadable consistency. For longer storage, refrigerate for up to 4 days, then bring to room temperature before serving. Freezing is not recommended, as the filling may weep and the texture will change.

Storage and Reheating

Store the cake covered at room temperature for up to 2 days or in the refrigerator for up to 4 days. Reheat individual slices in a microwave for 10–15 seconds or in a 350°F (175°C) oven for 5–8 minutes until warm. Avoid reheating the entire cake at once, as the center may overcook.

Serving and Pairing

This cake is rich and decadent, so it pairs well with light, refreshing sides. Serve with a scoop of vanilla bean ice cream, a dollop of whipped cream, or a small cup of coffee or tea. For a brunch or afternoon dessert, pair it with fresh berries and a sprinkle of powdered sugar. If you want a lighter option, serve it with a small glass of sparkling water or lemonade.

How to Transport the Cake

To transport the cake, wrap it tightly in plastic wrap or foil, then place it in a sturdy cake carrier or box. If traveling by car in warm weather, add a cold pack to the carrier to prevent the frosting from melting.

Substitutions and Swaps

This recipe is versatile, but some swaps will change the texture or flavor. Here are the best options:

  • Blueberries: Swap for raspberries, blackberries, or strawberries. Add 1 tbsp (7 g) extra flour to the filling to prevent weeping. The flavor will be sweeter and more tart.
  • Buttermilk: Substitute with 1 cup (240 ml) plain yogurt or sour cream, or make your own by adding 1 tbsp (15 ml) vinegar or lemon juice to 1 cup (240 ml) milk. Let it sit for 5 minutes before using.
  • Vanilla: Swap for almond extract (use ½ tsp for every 1 tsp of vanilla) or orange zest for a citrusy twist.

What Goes Wrong and How to Fix It

Most issues with this cake stem from overmixing the batter or uneven baking. Here’s how to avoid them:

  • Cake is dense: This usually happens if you overmix the batter, which develops gluten and makes the cake tough. Mix just until the ingredients are combined, and do not overbeat the frosting.
  • Cake is dry: If the cake is dry, it may have baked too long or you did not use enough buttermilk. Bake for the full 25–30 minutes, but check for doneness at 20 minutes. If the cake is dry, add 1 tbsp (15 ml) milk to the frosting to make it softer.
  • Filling weeps: If the blueberry filling is too liquidy, it may weep through the cake. Reduce the sugar in the filling by 1 tbsp (12 g) or add 1 extra tbsp (7 g) of flour to thicken it.
  • Frosting cracks: If the frosting cracks when spreading, let it sit at room temperature for 10 minutes to soften before spreading. Avoid spreading it on a warm cake, as it may melt and slide off.

Troubleshooting the Filling

If the blueberry filling does not thicken, it may not have cooked long enough. Return it to the oven for 5–10 minutes, stirring occasionally, until it reaches a syrupy consistency. If it is too runny, let it cool completely, then drizzle 1 tbsp (15 ml) of cornstarch mixed with 2 tbsp (30 ml) water over it and stir. Return to the oven for 5 minutes to thicken.

Decorating the Cake

For a simple look, pipe the frosting in a crisscross pattern on top of the cake. For a more elaborate design, use a star or round tip to create swirls. Dust the top with cocoa powder or sprinkle with chopped nuts for texture. If you want to add color, mix a few drops of red or blue gel food coloring into the frosting before piping.

Common Questions

What If I Have Fewer Blueberries?

If you have fewer than 2 cups (300 g) of blueberries, reduce the sugar in the filling by 2 tbsp (25 g) to balance the sweetness. Do not add extra sugar, as it will make the cake taste overly sweet. The cake will still be delicious but with less berry flavor.

How Much Filling Should I Use?

Use enough filling to cover the cake evenly without overflowing. For a 9-inch (23 cm) round cake, about 1½ cups (300 g) of filling is ideal. If you have extra, spread it on a separate plate or use it to fill a small cupcake liner for individual servings.

Can I Make This Cake Gluten-Free?

Yes, replace the all-purpose flour with a 1:1 gluten-free baking flour blend. Add 1 extra egg white to the batter for structure, and do not overmix. The texture will be slightly denser, but the flavor will remain rich and moist.

Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.

Spotted an error? Tell us and we will correct it (corrections policy).