This post contains affiliate links. Read the full disclosure here.

If you love a chocolate coconut candy bar, then you have got to try this chocolate coconut cake! Think moist chocolate cake layers flavored with coconut extract, and a coconut buttercream frosting. I’ve then topped it with shredded coconut for even more coconut flavor!

A rich chocolate cake with creamy white frosting and coconut shavings, partially sliced, displayed on a wooden board. The texture looks moist and indulgent.

One of my favorite cupcake recipes has to be my chocolate coconut cupcakes, so obviously, I needed to make a cake version! This chocolate coconut cake uses my super moist and rich chocolate cake recipe (you might have seen it already in my chocolate raspberry cake recipe!), but I added some coconut extract to get that coconut flavor.

I then filled and covered the cake with a coconut American buttercream! This cake is seriously giving maximum coconut flavor in every bite. 

Why You’ll Love This Chocolate Coconut Cake

  • You can easily make this cake dairy-free, so if you’re like me and have food allergies, you can still make it!
  • The cake is super moist and rich thanks to using oil instead of butter.
  • You get tons of coconut flavor thanks to coconut extract and shredded coconut. 

Ingredients Needed

Flat lay of baking ingredients on a blue surface, including labeled bowls of flour, sugar, cocoa, coconut flakes, eggs, milk, and butter sticks.
  • Milk: You can use regular milk or dairy-free milk. You can use coconut milk but I don’t recommend using canned coconut milk, it’ll make the chocolate cake dense.
  • Cocoa Powder: I recommend using Dutch-processed cocoa powder.
  • Coconut Extract: This is optional in the chocolate cake, but I really recommend using it to get maximum coconut flavor! Make sure you’re using a high-quality coconut extract, it makes all the difference.
  • Shredded Coconut: I prefer using sweetened shredded coconut, but in a pinch, you could use unsweetened. Just note that if you use unsweetened shredded coconut, the cake won’t be as sweet.

Step by Step Instructions

A white bowl filled with cocoa powder sits on a light blue countertop. A metal whisk is partially submerged in the powder, ready for mixing.

Step 1: Preheat your oven to 350°Fahrenheit. Spray two 8-inch round cake pans with cooking spray, then line the bottoms with parchment paper.

Step 2: In a large bowl, whisk the flour, cocoa powder, sugar, baking powder, baking soda, and salt together.

A white mixing bowl filled with smooth, dark chocolate cake batter on a light blue countertop, suggesting home baking in progress.

Step 3: Add the eggs, vanilla extract, coconut extract, oil and milk. Pour in the hot water and mix until smooth.

Two round cake pans filled with smooth, dark chocolate batter are placed on a light blue tiled surface, ready for baking.

Step 4: Divide the cake batter evenly between the two cake pans. Bake in the oven for 20-26 minutes, or until a toothpick inserted in the middle comes out clean.

Step 5: Let the cakes cool in the pans for 20 minutes, then remove to a wire cooling rack to cool completely.

Creamy, pale yellow batter is mixed in a stainless steel bowl with a paddle attachment, sitting on a light blue tiled surface.

Step 6: Once cool, make your buttercream. In the bowl of a stand mixer or in a large bowl with a handheld mixer, beat the butter, coconut extract, salt, and ½ cup of icing sugar together. Slowly add in another ½ cup of powdered sugar at a time until the frosting reaches your desired consistency. If the buttercream is too thick, add ½ tablespoon of milk at a time. If you find it too thin, you can add powdered sugar ¼ cup at a time. 

A cake being frosted with creamy white icing using an offset spatula on a wooden board. The scene conveys a sense of home baking and preparation.

Step 7: Cover the cake in the coconut buttercream. Sprinkle the shredded coconut on top and on the sides of the cake. 

A hand sprinkles shredded coconut over a round cake with white icing, creating a textured, snowy appearance. The scene conveys freshness and indulgence.

Step 8: Slice and enjoy! 

A slice of rich chocolate cake with creamy white frosting, topped with shredded coconut, sits on a decorative plate, conveying a tempting, indulgent mood.

Decorating Your Cake

I love decorating this coconut chocolate cake with lots of shredded coconut! It looks so beautiful, but it also means you get even more coconut flavor in every bite. 

It can be a bit tricky to cover the cake in shredded coconut, so this is what I recommend: after you’ve covered the top (generously!) with shredded coconut, take some more shredded coconut into your hands and gently press it into the frosting on the sides of the cake. I’ve found this to be the easiest way to cover the cake.

Expert Tips

  • I always recommend using a kitchen scale to measure out your flour and cocoa powder. It’s super easy to add too much if you’re using measuring cups, and that will make your cake dry and dense.
  • Don’t have a kitchen scale? Then make sure to use the scoop and level method to weigh out your flour and cocoa powder!
  • I’m using shredded coconut here, but you could swap it out for flaked coconut. Just note that the pieces are a lot bigger so your cake will look a bit different! 
  • Make sure the cake layers are completely cool before you start assembling the cake. Warm cake layers plus cold frosting is not a good combo!

Storage Instructions

Store the cake in a cake carrier or an airtight container at room temperature for 3-4 days.

To freeze the cake layers, let them cool completely, wrap them in plastic wrap, and then foil. Freeze in ziploc bags for up to 3 months. Let them thaw at room temperature.

Any leftover coconut buttercream can be stored in an airtight container in the freezer for up to 2 months. Let the frosting thaw in the fridge, then re-whip it before using.

More Cake Recipes You’ll Love

If you make this recipe, let me know how it went in the comments below, I’d love to hear from you! You can also tag me on Instagram or Facebook so I can check it out!

A rich chocolate cake with creamy white frosting and coconut shavings, partially sliced, displayed on a wooden board. The texture looks moist and indulgent.
No ratings yet

Chocolate Coconut Cake

If you love a chocolate coconut candy bar, then you have got to try this chocolate coconut cake! Think moist chocolate cake layers flavored with coconut extract, and a coconut buttercream frosting.

Ingredients
 

Coconut Chocolate Cake

  • cups (187.5 g) all-purpose flour
  • cup (250 g) granulated sugar
  • ½ tsp salt
  • 1 ½ tsp baking soda
  • ½ tsp baking powder
  • ¾ cup (64.5 g) unsweetened cocoa powder
  • 2 eggs
  • 1 cup (225 ml) water, hot
  • ½ cup (107.5 ml) canola oil (or sunflower oil)
  • 1 tsp vanilla extract
  • 1 tsp coconut extract
  • ½ cup (125 ml) milk, (regular or vegan)

Coconut Buttercream Frosting

  • 2 cup (420 g) butter, softened, (regular or vegan)
  • 3½-4 cup (480 g) powdered icing sugar
  • 2 tsp coconut extract
  • ¼ tsp salt
  • 1-2 Tbsp milk, as needed, (regular or dairy free)

For Topping

  • cup shredded sweetened coconut, see notes*

Instructions
 

  • Preheat the oven to 350°F and prepare two 8 inch round cake pans. Spray the inside with cooking spray, then cut round pieces of parchment paper so that they fit in the bottom of each pan (do not skip the parchment paper lining!)
  • Whisk flour, cocoa powder, sugar, salt, baking powder, baking soda together in a large bowl.
  • Add in the eggs, coconut extract, vanilla, oil, and milk. Pour in the hot water and mix until smooth.
  • Divide the batter evenly between the two cake pans and bake on the middle rack of the oven for 20-26 minutes or until a toothpick inserted in the middle of the cakes comes out clean.
  • Let the cakes cool in the pans for 20 minutes, then run a butter knife around the outside of the cake to loosen it from the pan and flip upside down onto a cooling rack to cool completely.
  • Make the buttercream. In the bowl of a standing mixer or handheld mixer, beat butter, coconut extract, salt, and ½ cup of icing sugar. Slowly add in ½ cup of powdered sugar at a time until it reaches your desired consistency. If the buttercream is too thick, you can add ½ tablespoon of milk in at a time, thinning it out as much as you'd like. If buttercream is too thin, add in more powdered sugar ¼ cup at a time.
  • Once the cakes have cooled completely, add the frosting. Cover the cake in buttercream, then sprinkle the coconut on top and on the sides. For the sides, you can use your hands to gently press the shredded coconut into the cake. The cake should be generously coated in coconut.
  • Slice and enjoy!

Notes

Parchment Paper Lining: I highly recommend not skipping this step. It is highly likely that the cake may break when you try to remove it from the pan if you do, since this is a very soft cake. Lining the round pan with parchment paper will make your life so much easier when removing the cakes from the pan, trust me. To do this, trace then cut a circle in the shape of your cake pan out of the parchment paper and place it inside the pans.
Measuring Flour: Either measure your flour using a kitchen scale or use the proper scoop and level method: fluff the flour in the bag/container with a fork then use a spoon to scoop the flour into the measuring cup, then run the back of a knife along the top of the cup to even it out. 
Coconut: Shredded works best but if you don’t mind big pieces of coconut you can use flaked. My recommendation is sweetened but if you prefer desserts to be less sweet, unsweetened is fine in a pinch.
Storage and Freezing Instructions: 
The cake can be stored covered at room temperature for 3-4 days. I store mine in a cake carrier.  
To freeze the cake layers, let them cool completely, then tightly wrap them in plastic wrap, then aluminium foil. Freeze in ziploc bags for up to 3 months, then let them thaw at room temperature.
Leftover buttercream can be stored in an airtight container in the freezer for up to 2 months. Thaw it in the fridge then mix it up using a handheld or standing mixer before using it.
To make in two 9 inch round cake pans: The cake layers will be thinner and will bake quicker. Start checking on them at around 14 minutes.
To make in a 9×13 sheet pan: Bake for 18-20 minutes. You will only need half the buttercream for a layer cake, so halve the buttercream recipe.
To make as a 3 layer cake: The easiest way is to divide the batter between 3 8 inch cake pans (you’ll have thinner cake layers). If you want big layers, you can also multiply the ingredients in the recipe by 0.5.
Calories: 447kcal, Carbohydrates: 41g, Protein: 3g, Fat: 31g, Saturated Fat: 9g, Polyunsaturated Fat: 8g, Monounsaturated Fat: 13g, Trans Fat: 0.2g, Cholesterol: 23mg, Sodium: 467mg, Potassium: 135mg, Fiber: 2g, Sugar: 28g, Vitamin A: 1196IU, Vitamin C: 0.1mg, Calcium: 30mg, Iron: 1mg
Did you make this recipe?Please let us know by leaving a star rating and review!

The calorie information provided for this recipe is an estimate. The accuracy of the calories listed is not guaranteed.

Photography by: Kelly at Bake & Bacon