Moist Chocolate Zucchini Cake Recipe with Cocoa and Olive Oil

This chocolate zucchini cake is incredibly moist and fudgy, with deep chocolate flavor and a creamy chocolate frosting. The grated zucchini melts into the batter as it bakes, so there’s no detectable vegetable flavor—just an ultra-indulgent cake that works as a layered cake or in a 9×13-inch pan.

Slice of chocolate zucchini cake with chocolate frosting

If you want a very moist, fudgy chocolate cake, try this chocolate zucchini cake. It uses about a pound of grated zucchini, which dissolves into the batter during baking and helps create a dense, tender crumb. You won’t taste the zucchini—only rich chocolate goodness.

This recipe isn’t presented as a health food; it’s simply a delicious way to use up garden zucchini and produce one of the fudgiest chocolate cakes you can bake. The method is straightforward, and I include options for several pan sizes below.

8-inch round chocolate zucchini cake with chocolate frosting

Ingredients You’ll Need

  • 2 cups all-purpose flour — provides structure. Measure by spooning into a cup or use a scale (250 g).
  • 3/4 cup Dutch-processed cocoa — use Dutch-processed (specialty dark) for deeper flavor (about 68 g).
  • 1 1/2 tsp baking powder + 1/2 tsp baking soda — the combination gives the best rise and texture.
  • 1/2 tsp salt — balances sweetness.
  • 1 cup granulated sugar and 3/4 cup brown sugar — brown sugar adds moisture and depth.
  • 1/2 cup vegetable oil + 1/2 cup melted butter — oil keeps the cake moist while butter improves flavor and texture.
  • 3 large eggs — room temperature, for lift and richness.
  • 1/3 cup sour cream — helps make the cake extra tender; plain Greek yogurt works as a substitute.
  • 2 tsp vanilla extract — for flavor.
  • 1–2 tsp instant espresso powder (optional) — enhances the chocolate without adding a coffee taste.
  • 3 cups grated zucchini — measure after grating (about 1 lb / 454 g). No need to peel; trim the ends and grate with a box grater.

Making Chocolate Zucchini Cake

This cake comes together quickly because there’s no creaming step. Follow these key steps for the best results.

  1. Preheat the oven to 350°F (180°C). Prepare pans: for rounds, grease the sides and line bottoms with parchment; for a 9×13-inch pan, grease and dust with cocoa powder.
  2. Grate zucchini using the regular side of a box grater. If strands are long, chop them to ~1-inch lengths. Gently blot with paper towels to remove excess surface moisture; don’t dry completely—the batter should remain moist.
  3. In a large bowl, sift together flour, Dutch cocoa, baking powder, baking soda and salt. Add granulated sugar and whisk to combine.
  4. In a separate large bowl, whisk together melted butter, oil, brown sugar, eggs, sour cream, vanilla and instant espresso powder until smooth and no lumps remain.
  5. Make a well in the dry ingredients and pour in the wet mixture. Stir gently with a rubber spatula or wooden spoon until the batter is about 50–60% combined; some streaks of dry ingredients are expected.
  6. Fold in the grated zucchini, finishing with a few stirs by hand and then 10–20 seconds on low with an electric mixer if desired. Stop when you no longer see dry streaks—overmixing causes toughness and air tunnels.
  7. Divide batter evenly between prepared pans and bake on the middle rack. The cake is done when the top is set, the edges pull away slightly from the pan, and a toothpick comes out clean. If unsure, bake a few extra minutes—this cake resists drying out.
  8. Cool cakes fully. For layer cakes, cool in pans at least 25 minutes then invert to finish cooling on a wire rack. For a 9×13-inch cake, cool in the pan before frosting.
Grated zucchini on a cutting board and grated zucchini in a bowl lined with paper towel

Pan Sizes & Bake Times

Choose the pan size that fits your needs. A 9×13-inch pan is easiest if you prefer not to assemble layers.

  • Two 8-inch rounds with 2-inch sides — 40–45 minutes (do not use 1.5-inch sides; the batter may overflow).
  • Two 9-inch rounds — 28–35 minutes.
  • 9×13-inch pan — 40–50 minutes; use half the frosting recipe for this size.
  • 8×8-inch square pan — halve the cake recipe (use 1 egg + 1 egg yolk), bake ~30–35 minutes.
  • Cupcakes — reduce bake time and batter amounts accordingly.
Bowl of chocolate cake batter with shredded zucchini added, and bowl of chocolate zucchini cake batter

Chocolate Frosting (Summary)

Beat softened butter until creamy, add powdered sugar gradually, then sift in cocoa powder with vanilla and salt. Alternate adding the remaining powdered sugar with 1–2 tablespoons of heavy cream or milk at a time until you reach the desired consistency and sweetness. For a full layer cake you’ll likely use 3–4 cups powdered sugar; for a 9×13-inch cake, plan on roughly half the frosting quantities.

Slice of 2 layer chocolate zucchini cake with chocolate frosting

This cake is decadent without being overly sweet. It’s excellent frosted or served plain (try baking in a 9×13 pan and folding in 1 cup chocolate chips to the batter for extra chocolate). The texture is fudgy and moist, a favorite for zucchini season and a crowd-pleasing dessert.

Notes

  • Make-ahead: Bake layers a day ahead, cool completely, then wrap tightly. Store at room temperature overnight. Make frosting and assemble on the serving day. If your kitchen is warm, refrigerate assembled cake.
  • Leftovers: Store covered in the refrigerator up to 4 days.
  • Freezing: Wrap unfrosted layers tightly and freeze up to 2 months. Thaw in the refrigerator before frosting—do not thaw at room temperature to avoid sogginess.
  • Frosting for 9×13: If halving the frosting, use about 3/4 cup butter, 1 1/2–3 cups powdered sugar, 1/4 cup + 2 tbsp cocoa, 1/2 tsp vanilla, pinch of salt, and 2–3 tbsp milk or cream to adjust texture.
  • Nutrition: Provided nutrition values are estimates per slice when divided into 12 pieces and using all the frosting.
Slice of chocolate zucchini cake with creamy chocolate frosting

Enjoy this chocolate zucchini cake for dessert, parties, or anytime you want a rich, moist chocolate treat that makes the most of fresh zucchini.