Discover the magic of a beloved Mexican dessert that seems to defy logic with its transforming layers in this classic recipe!

I love to watch baking shows. I get particularly interested when the contestants receive an “impossible” challenge. Seeing how they manipulate ingredients and cooking methods to produce jaw-dropping results—or catastrophic failures—sparks my own culinary competitiveness.
That driving ambition kicked in recently when I learned about chocoflan, a Mexican dessert sometimes called “impossible cake” or “magic cake.” I was immediately fascinated by the baking alchemy involved and the dramatic presentation highlighted in social media posts. This beautifully layered cake-flan mashup originated in Mexico but was influenced by impressive European desserts, like Spanish flan and French crème caramel. Traditional versions often include cajeta, a caramel made from goat’s milk, as the base.
This chocolate flan cake recipe adheres closely to classic methodologies. Making it feels a little like being in science class because you have to follow directions that might feel counterintuitive—like putting the layers into the pan upside-down and in the wrong order! Then you have to trust that the process will yield the results you want.
Feeling intimidated? I get it. I was, too. But the big payoff comes when you flip your Bundt pan over and unmold an impossibly beautiful creation. And when your guests rave about the incredibly rich, creamy, chocolaty flavors in every decadent bite!

The science behind this cake’s transformation
The “magic” of this cake lies in its preparation and transformation during baking. The chocolate cake batter is layered in the pan first, topped with liquid flan custard. As both bake together in a water bath, the leavening in the cake batter produces carbon dioxide, causing the chocolate cake to become lighter and rise through the denser flan mixture. The flan, which starts on top, is heavier, so it sinks to the bottom—which, after unmolding, is the top of the finished cake. When you invert the pan, the two layers have “switched” places! A creamy, jiggly flan sits atop a moist chocolate cake, all bathed in a layer of caramel. This visually striking result, combined with the cake’s rich textures and flavors, has made chocolate flan cake a beloved dessert throughout Mexico and in Latin kitchens worldwide.

How do I store leftovers?
Store leftover chocolate flan cake loosely covered in plastic wrap or inside an airtight container—being careful not to press on the top and disturb the layers. Leftovers will keep in the fridge for up to 3-5 days. You can also freeze this dessert for up to 1 month. Cut leftovers into individual slices, wrap each carefully in plastic wrap, then place them in a freezer-safe container. Thaw overnight in the fridge and serve cold, drizzled with extra caramel sauce if desired.

Serving suggestions
Serve chocolate flan cake as dessert after a special meal or as an afternoon treat. It pairs especially well with hot or cold coffee drinks, like a Homemade Iced Americano, Chocolate Cream Cold Brew (Starbucks Copycat), or a Copycat Starbucks Vanilla Spice Latte. For non-coffee drinkers, you can offer hot Homemade Russian Tea, Rich And Creamy Hot Chocolate, or a Refreshing Mint Lime Iced Tea Cooler.

Chocolate Flan Cake
Ingredients
For The Cake:
- 1/2 cup + 2 tablespoons all-purpose flour
- 1/3 cup cocoa powder
- 1/2 teaspoon baking soda
- 1/4 teaspoon salt
- 4 ounces bittersweet baking chocolate chopped
- 6 tablespoons unsalted butter melted
- 1/2 cup buttermilk
- 1/2 cup granulated sugar
- 2 eggs
- 1 teaspoon vanilla extract
- 1/2 cup caramel sauce
For The Flan:
- 2 cans sweetened condensed milk (14 ounces each)
- 2 1/2 cups whole milk
- 6 ounces cream cheese softened to room temperature
- 6 large eggs
- 4 large egg yolks
- 1 teaspoon vanilla extract
Instructions
- Preheat oven to 350°F. Prepare a 12-cup Bundt cake pan with a light coating of nonstick cooking spray.
Make The Cake Batter:
- In a medium bowl, whisk together the flour, cocoa, baking soda, and salt. Set aside.

- Place the chopped chocolate and melted butter in a microwave-safe bowl. Microwave at 50% power in 30-second increments, stirring between each, until fully melted and smooth. Allow to cool slightly.

- In a separate large bowl, whisk together the buttermilk, granulated sugar, eggs, and vanilla extract. Slowly whisk the melted chocolate mixture into the wet ingredients until combined.

- Gently fold the flour mixture into the wet ingredients until just combined. Do not overmix.
Prepare The Flan Mixture:
- In a blender or using an immersion blender, combine the sweetened condensed milk, whole milk, cream cheese, eggs, egg yolks, and vanilla extract. Blend for about 1 minute until the mixture is smooth and uniform.

Assemble And Bake The Cake:
- Pour the caramel sauce into the bottom of the pan.

- Carefully spread the chocolate cake batter over the caramel layer.

- Slowly pour the flan mixture over the cake batter—it will gently layer on top.

- Place the Bundt pan into a large roasting pan or deep baking dish. Carefully pour enough boiling water into the roasting pan to come halfway up the sides of the Bundt pan to create a water bath. This ensures even, gentle baking.

- Bake in the preheated oven for 75 to 90 minutes, or until a toothpick inserted into the cake portion (not the flan) comes out clean. Alternatively, use an instant-read thermometer to check for an internal temperature of 180°F.

Chill And Finish The Cake:
- Remove the Bundt pan from the water bath and transfer it to a wire rack. Allow the cake to cool to room temperature, about 1 hour. Then, refrigerate the cake in the pan for at least 8 hours or overnight to fully set the flan.
- To unmold the cake, dip the bottom of the Bundt pan in warm water for about 1 minute to loosen the caramel. Place a serving plate over the pan and carefully invert it. The cake should release easily, with the caramel sauce drizzling over the top and sides.

- Slice and serve cold.


What temperature should the oven be at?
Hi Lauren, you can bake it at 350°F. Enjoy!
Hi Bree,
I was so excited to try this cake for my birthday! After having prepared everything perfectly, I set the Bundt pan in the roasting pan and proceeded to fill the roasting pan with hot tapwater…to my surprise the chocolate cake started lifting into the flan before I could even get it into the oven. I put it in the oven and as I close the door set a few F bombs because I should have used the coldest tapwater or even ice water to fill the roasting pan with. Unfortunately the hot water released the caramel sauce which released the cake into the flan😵
I can send you what it ended up like tomorrow because I will have this cake for my birthday!!!🥳
Hi Jody, Oh no, that sounds so frustrating! I hope it still tastes amazing, and I’m sure your birthday will be extra special with it. Let me know how it turns out tomorrow please.
Well Bree Beast your eyes on my birthday cake!! I was laughing when you said it was part science experiment and I don’t know how this turned out the way it did. Hopefully it tastes as good as it looks.☺️
Hope you enjoyed this recipe!
How do I submit a pic???
You can’t post directly but you can send me an email on [email protected]. Thanks!
You weren’t kidding when you said it was part science experiment. I don’t know how this turned out the way it did and as soon as I can, I’ll upload a pic to you.
Awesome! Thanks Jody