If the idea of mayonnaise in cake sounds strange, you're not alone, but chocolate mayonnaise cake is one of those old-fashioned recipes where this baking trick really works. Mayonnaise replaces the oil and eggs you'd normally use, giving the cake an incredibly moist, tender crumb… and I promise, it does not taste like mayonnaise.

Flavor and Texture of a Mayonnaise Cake
This Chocolate Mayonnaise Cake is rich, dark, and not overly sweet, with a soft texture somewhere between devil's food cake and a classic chocolate layer cake. And the frosting? A creamy chocolate sour cream frosting that makes the whole thing taste like it came from a bakery.
Notes About This Cake
If you've never baked with mayonnaise before, this is the recipe to try. I've increased the moisture and flavor level with a few little tricks including blooming the cocoa in hot water, incorporating brown sugar and adding espresso powder. Lastly, the creamy chocolate frosting contains sour cream, which add flavor and body. I particularly like the flavor.
Recipe

Chocolate Mayonnaise Cake with Sour Cream Frosting
Ingredients
Cake
- 1 ⅓ cups water
- 1 teaspoon espresso powder
- ¾ cup + 1 tablespoon Dutch-process cocoa powder
- 3 large eggs
- 1 cup granulated sugar (200 grams)
- ½ cup plus 1 tablespoon packed light brown sugar (120 grams)
- 1 tablespoon vanilla extract
- 1 ¼ cups mayonnaise
- 2 ¼ cups all-purpose flour (290 grams)
- ¼ teaspoon baking powder
- 1 ¾ teaspoons baking soda
- ½ teaspoon salt plus a little pinch
Sour Cream Frosting
- 10.5 tablespoons unsalted butter, cut into chunks and softened (150 grams)
- ¾ cup plus 2 tablespoons unsweetened cocoa powder
- 4 cups confectioners' sugar sifted
- ¼ teaspoon salt omit if using salted butter
- ½ cup room temperature sour cream
- 2 teaspoons vanilla extract
Instructions
- Preheat oven to 350 degrees F. Grease two 9-inch round cake pans. Line bottoms with parchment circles if desired, then grease again and dust with flour.
- In a large saucepan, boil the water. Remove from heat and add the espresso powder and cocoa powder. Stir until smooth and set aside.
- In the bowl of a stand mixer, beat the eggs, sugar and brown sugar for a full 7 minutes or until thick and light. Add the mayonnaise and vanilla and beat on medium until combined.
- In a second bowl, thoroughly mix together the flour, baking powder, baking soda, and salt.. Add to the egg mixture and stir until mixed.
- Pour in the cocoa mixture and stir well. Batter will be thin.
- Pour into prepared pans and bake on center rack for 30 minutes. Remove from oven and let cool on a wire rack for 10 minutes. Invert cakes on a cooling rack, peel away the parchment (if you used it), and let cool completely.
Sour Cream Chocolate Frosting
- Be sure to bring all of the ingredients to room temperature. If cocoa powder and sugar are lumpy, it doesn't hurt to sift them.
- Beat the butter until light and creamy, then add the cocoa powder and beat until mixed. Gradually add the confectioners' sugar (and salt, if using) and sour cream and beat until smooth. Beat in the vanilla.





Sue says
I've made this cake a few times now and it's definitely a favorite. It's moist with great chocolate flavor, great texture, and excellent frosting.
Karen says
Just went looking to see how your recipe compares to the "new" one I found last week. I have made it twice already. LOL Yours has more ingredients, but I think I will try it to compare. Here is the one I made:
Super Moist Chocolate Cake
2 cups sugar, 2 cups flour, 2 cups brewed coffee, 1 cup cocoa, 1 cup mayonnaise, 2 teaspoons baking soda, 2 eggs.
Blend well, grease 9x13 pan. Bake at 350 degrees for 40-45 min.
I halved it. First time used cold coffee, 2nd time warm water, no coffee. Much better with the coffee but VERY edible with the water. I used Hershey's special dark cocoa. Both times I used a glass baking pan, baked at 350 for 35-37 min. Cake is almost like fudge.
What surprised me is... I have never liked the taste of coffee. I COULD not tell in this cake. Wow! Just expanded my horizons.
Julie says
Thanks, Anna! That's very helpful. It's true, I think the density of cocoa powders can vary depending on how settled or packed it is, etc.
Anna says
Hi Julie! Good question about the cocoa powder. I never weigh it, but the general weight for Hershey's Dark cocoa is 1 ounce/28 grams per 1/3 cup. So for this I used about 68 grams. I think you are right about weighing cocoa powder -- especially if you are trying a new brand. I bought some very expensive cocoa powder and noticed my brownies and other baked goods were a bit dryer than usual. I blamed it on the cocoa powder itself, but now I'm wondering if it was just a little heavier cup for cup and if I should have just used less.
Julie says
I love mayonnaise cake too. It was my favorite when I was a kid. This recipe is perfect for me (I love Dutch cocoa; I have 9" pans). I was wondering if you have a weight measurement for the cocoa? If not, please don't go do one; I'll just spoon and sweep! Cocoa is so fine and clumpy that I always feel I'm certainly getting an inaccurate measurement when I use it...but I haven't had any disasters so who knows:)
Anna says
Sue, we love the Troy Chocolate Cake, too. It's more practical for us since it's small. https://www.cookiemadness.net/2008/02/troy-chocolate-cake/
Sue says
I also like mayo cake. There is a little mayo cake on your blog that we liked a lot and was a nice size for a smaller household. I can't remember the name of it. Maybe Troy Chocolate cake?
Cookie Sleuth says
This looks delicious. Time for a snack... 🙂
Jennifer J-W says
I love homemade chocolate cakes, especially ones that have either mayo or buttermilk. It looks absolutely delicious.
Darlene says
It appears to be wonderfully moist and have a perfect density (dense enough so that it has that homemade quality but not too dense). My father would also adore this.
Katrina says
Well, it certainly looks delicious. My dad would go crazy for chocolate cake. He used to walk around the house like a lost puppy and say "I wish I had some chocolate cake!" 😉
Jan Harris says
Oh, fond memories. My mother made a wonderful mayonnaise cake. I've made it too from her recipe. My fav!