Homemade Chocolate Coconut Cake Recipe with Coconut-Pecan Frosting

This homemade chocolate coconut cake recipe makes one rich, moist two-layer 9-inch cake that serves about 10–12 people. The chocolate batter uses hot water or brewed coffee for a tender crumb, while sweetened shredded coconut adds chewiness to every slice; the finished cake is covered with a traditional cooked coconut-pecan frosting.

Each bite combines deep cocoa flavor, buttery coconut, toasted pecans, and a silky chocolate finish if you choose to add ganache. Plan on 30–35 minutes for preparation, 30–35 minutes for baking, and 1–2 hours for cooling and assembly so the frosting sets properly before serving.

Jump to Recipe

Why You’ll Love This Recipe

Two-layer chocolate coconut cake with coconut-pecan frosting

This cake brings together the best parts of a chocolate layer cake and a coconut-pecan celebration cake. The cocoa batter is soft and moist from buttermilk and vegetable oil, while the hot liquid helps create a smooth, tender crumb that stays pleasant even after chilling.

The coconut appears in both the cake and the frosting, so its flavor is present without overpowering the chocolate. Toasted pecans add a buttery crunch that balances the soft layers and creamy topping.

It is also a practical dessert for birthdays, holidays, potlucks, and family dinners. The cake layers can be baked ahead, and the frosting can be prepared while the layers cool.

If you enjoy desserts with fruit and cream, our easy berry ice box cake is another lovely choice for a special menu.

Ingredients You’ll Need

Ingredients for homemade chocolate coconut cake

The cake begins with everyday baking staples: all-purpose flour, granulated sugar, natural unsweetened cocoa powder, baking powder, baking soda, and fine salt. Natural cocoa powder works with the baking soda and buttermilk to provide the proper lift and a balanced chocolate flavor.

Room-temperature eggs blend more easily into the batter, while buttermilk contributes tenderness and a subtle tang. Neutral vegetable oil keeps the crumb moist without adding a competing flavor, and vanilla rounds out the cocoa.

The final cake ingredient is one cup of sweetened shredded coconut. Choose a shred size you enjoy eating, since the coconut remains noticeable in the baked layers.

  • For the frosting: evaporated milk, sugar, egg yolks, unsalted butter, vanilla, sweetened shredded coconut, toasted pecans, and salt.
  • For the optional finish: semisweet chocolate and heavy cream.

Toast the pecans and coconut lightly if you want a more pronounced nutty flavor, then cool them completely before adding them to the frosting. Warm ingredients can change the texture of the cooked topping.

How to Make It Step-by-Step

Preparing coconut-pecan frosting for chocolate cake

Step 1: Heat the oven to 350°F (175°C), then grease two 9-inch round cake pans. Line the bottoms with parchment so the delicate chocolate layers release cleanly after cooling.

Step 2: In a large bowl, whisk together the flour, sugar, cocoa powder, baking powder, baking soda, and salt. Mixing the dry ingredients thoroughly distributes the leaveners and prevents pockets of cocoa or salt in the finished cake.

Step 3: Add the room-temperature eggs, buttermilk, oil, and vanilla. Beat the mixture for about 2 minutes, stopping when the batter looks smooth and evenly combined.

Step 4: Stir in the boiling water or hot brewed coffee. The batter will become quite thin, and that loose consistency is expected for this hot-liquid chocolate cake method; fold in the shredded coconut after the liquid is incorporated.

Step 5: Divide the batter evenly between the prepared pans. Bake for 30–35 minutes, checking with a toothpick in the center; the cakes are ready when it comes out with a few moist crumbs rather than wet batter.

Step 6: Let the cakes cool in their pans for 10 minutes. Turn them out onto wire racks and cool completely, because frosting a warm cake can cause the topping to melt and the layers to shift.

Step 7: Make the frosting by whisking the evaporated milk, sugar, egg yolks, butter, and salt together in a saucepan. Cook over medium heat for 10–12 minutes, stirring constantly, until the mixture is thick enough to coat a spoon; keep the heat moderate and avoid an aggressive boil.

Step 8: Remove the saucepan from the heat and stir in the vanilla, coconut, and chopped toasted pecans. Transfer the frosting to a bowl and cool it to room temperature, allowing time for it to thicken before assembly.

Step 9: Put one cooled cake layer on a serving plate and spread approximately one-third of the frosting over the top. Set the second layer in place, then use the remaining frosting to cover the top and sides.

Step 10: To make the optional ganache, heat the heavy cream until steaming but not boiling. Pour it over the chopped semisweet chocolate, wait 2 minutes, stir until smooth, cool briefly until thickened, and drizzle it over the assembled cake.

Pro Tips for the Best Cake

Toasted pecans and coconut on chocolate cake frosting

Use hot brewed coffee in place of water when you want a deeper cocoa impression. Coffee will not make the cake taste strongly of coffee; instead, it helps the chocolate taste fuller.

Measure the flour carefully by spooning it into a measuring cup and leveling the top, or use the gram measurement. Too much flour can make the layers dense and reduce the moist texture this recipe is designed to provide.

Keep stirring the frosting while it cooks, especially around the bottom and corners of the saucepan. The mixture should thicken gradually and coat a spoon, but it should not boil aggressively.

Cooling is part of the recipe, not an optional pause. Give the cake layers enough time to reach room temperature, and wait until the coconut-pecan frosting is fully cool before spreading it.

For another cozy layer cake idea, take a look at our apple cake with cream cheese frosting, which brings warm fruit flavor to the dessert table.

Serving, Storage, and Make-Ahead Advice

Serve this cake in slim wedges because the frosting is rich and packed with coconut and pecans. A glass of cold milk, a cup of coffee, or unsweetened tea makes a pleasant pairing.

Once assembled, cover the cake and refrigerate it so the cooked frosting stays firm. Let slices sit briefly at room temperature before serving for a softer crumb and a creamier topping.

The unfrosted cake layers may be wrapped once completely cool and held until you are ready to assemble. You can also prepare the frosting ahead, refrigerate it in a covered container, and let it soften enough to spread while keeping it cool.

For a complete homemade brunch or party spread, our homemade Hawaiian sweet rolls pair beautifully with savory dishes before dessert.

Optional Chocolate Ganache Finish

Chocolate coconut cake slice with ganache drizzle

The ganache is not required, but it gives the cake a polished bakery-style appearance and adds a smooth semisweet chocolate note. Keep the drizzle modest so it complements rather than hides the coconut-pecan frosting.

For a clean effect, spoon or pour the slightly cooled ganache around the center of the cake and encourage a few drips down the sides. If it seems too fluid, wait another minute or two; if it becomes too thick, warm it gently until it flows.

Homemade Chocolate Coconut Cake Recipe with Coconut-Pecan Frosting

Homemade Chocolate Coconut Cake

A moist hot-liquid chocolate cake filled and covered with creamy coconut-pecan frosting. Optional semisweet chocolate ganache adds a glossy finish and extra chocolate flavor.
Prep Time 30 minutes
Cook Time 30 minutes
Total Time 2 minutes
Servings: 10 servings

Ingredients
  

Chocolate Cake
  • 2 cups (250 g) All-purpose flour
  • 1 3/4 cups (350 g) Granulated sugar
  • 3/4 cup (64 g) Unsweetened natural cocoa powder
  • 1 1/2 teaspoons Baking powder
  • 1 1/2 teaspoons Baking soda
  • 1 teaspoon Fine salt
  • 2 eggs Large eggs, room temperature
  • 1 cup (240 ml) Buttermilk
  • 1/2 cup (120 ml) Neutral vegetable oil
  • 2 teaspoons Vanilla extract
  • 1 cup (240 ml) Boiling water or hot brewed coffee
  • 1 cup (85-100 g) Sweetened shredded coconut
Coconut-Pecan Frosting
  • 1 can (12 fl oz/354 ml) Evaporated milk
  • 1 cup (200 g) Granulated sugar
  • 3 yolks Large egg yolks
  • 1/2 cup (113 g) Unsalted butter
  • 1 teaspoon Vanilla extract
  • 1 1/2 cups (120-130 g) Sweetened shredded coconut
  • 1 cup (110 g) Chopped toasted pecans
  • 1/4 teaspoon Salt
Optional Chocolate Finish
  • 4 oz (115 g) Semisweet chocolate, chopped
  • 1/2 cup (120 ml) Heavy cream

Method
 

Step-by-Step
  1. Heat the oven to 350°F (175°C). Grease two 9-inch round cake pans and line the bottoms with parchment.
  2. Whisk the flour, sugar, cocoa powder, baking powder, baking soda, and salt in a large bowl.
  3. Add the eggs, buttermilk, oil, and vanilla. Beat for about 2 minutes, until the mixture is smooth.
  4. Stir in the boiling water or hot brewed coffee. The batter will be thin, which is normal. Fold in the shredded coconut.
  5. Divide the batter between the prepared pans. Bake for 30–35 minutes, until a toothpick inserted in the center comes out with a few moist crumbs.
  6. Cool the cakes in their pans for 10 minutes, then turn them onto cooling racks. Cool completely before frosting.
  7. For the frosting, whisk the evaporated milk, sugar, egg yolks, butter, and salt in a saucepan. Cook over medium heat, stirring constantly, for 10–12 minutes, until thick enough to coat a spoon; do not let it boil aggressively.
  8. Remove the frosting from the heat and stir in the vanilla, coconut, and pecans. Cool it to room temperature, remembering that it thickens as it cools.
  9. Place one cake layer on a serving plate and spread it with about one-third of the frosting. Add the second layer, then cover the top and sides with the remaining frosting.
  10. For the optional ganache, heat the cream until steaming but not boiling. Pour it over the chopped chocolate, rest for 2 minutes, stir until smooth, cool briefly until thickened, and drizzle over the assembled cake.

Notes

Use hot brewed coffee for a deeper chocolate taste without a strong coffee flavor. Cool the cooked coconut-pecan frosting completely before assembly so it does not slide between the layers. Store the finished cake covered in the refrigerator and let it sit briefly at room temperature before serving.

Final Thoughts

This homemade chocolate coconut cake is the kind of dessert that earns attention as soon as it reaches the table. The moist cocoa layers, sweet coconut, buttery pecans, and optional ganache create a rich combination with enough texture to keep every bite interesting.

Although the recipe takes time for cooling and frosting, the process is straightforward. Bake the layers until they show a few moist crumbs, cook the frosting slowly, and assemble only after everything has cooled completely.

Make it for a birthday, holiday gathering, or weekend dessert when you want a cake that feels generous and special. Cut it into 10–12 servings, add a final sprinkle of toasted pecans if desired, and enjoy each slice with your favorite warm drink.

Leave a Comment

Recipe Rating