The Feast

Home cooking recipes for everyday dinners and easy entertaining

How to Make Chocolate Pie Filling from Scratch

· 5 min read · Baking and Desserts

The most common way to make chocolate pie filling is a stovetop pudding-style mixture of cocoa, sugar, cornstarch, milk, and egg yolks, cooked until thick, then poured into a baked pie shell and chilled until set. This gives you a rich, smooth, sliceable filling that works in a pastry crust, a graham cracker crust, or even a chocolate cookie crust. If you want a no-cook filling, you can use melted chocolate folded into whipped cream, but that sets lighter and softer, so it needs a firmer crust and longer chilling.

Before You Start: What You Need and How to Check It

You need a 9-inch (23 cm) baked pie crust, a medium saucepan, a whisk, and a rubber spatula. The filling uses about 3 cups (720 ml) of milk, so a 2-quart (2 L) saucepan is big enough. You also need a food thermometer if you want to be precise, but the visual cue of the filling bubbling and thickening is reliable. Check that your cornstarch is fresh—old cornstarch loses thickening power. If your cocoa is lumpy, sift it before measuring.

Stovetop Chocolate Pie Filling Sets in About 4 Hours

This filling takes about 15 minutes of active cooking, then at least 4 hours in the fridge to set firmly enough to slice. The cornstarch and egg yolks do the thickening, so do not skip either one. The recipe below makes enough for one 9-inch (23 cm) pie, about 6 to 8 servings.

Ingredients for the Filling

  • 1 cup (200 g) granulated sugar
  • 1/4 cup (30 g) unsweetened cocoa powder
  • 3 tbsp (24 g) cornstarch
  • 1/4 tsp salt
  • 2 cups (480 ml) whole milk
  • 3 large egg yolks
  • 2 tbsp (30 g) unsalted butter, cut into pieces
  • 1 tsp vanilla extract

Instructions

  1. In a medium saucepan, whisk together the sugar, cocoa, cornstarch, and salt until no lumps remain.
  2. In a separate bowl, whisk the egg yolks, then slowly whisk in about 1/2 cup (120 ml) of the milk until smooth. Whisk in the remaining milk.
  3. Pour the milk mixture into the saucepan with the dry ingredients and whisk until completely combined.
  4. Place the saucepan over medium heat and cook, whisking constantly, until the mixture thickens and comes to a low boil. This takes about 8 to 10 minutes. The filling is ready when it is thick enough to coat the back of a spoon and you see a few large bubbles pop on the surface.
  5. Once it bubbles, cook for 1 full minute more, whisking, to ensure the cornstarch is fully cooked and the egg yolks are safe. The filling should reach 160°F (71°C) on a food thermometer, which is the USDA FSIS safe minimum for egg dishes.
  6. Remove the saucepan from heat. Stir in the butter and vanilla until the butter is melted and the filling is smooth.
  7. Pour the hot filling directly into your baked pie crust. Smooth the top with a spatula.
  8. Press a piece of plastic wrap directly onto the surface of the filling to prevent a skin from forming. Refrigerate for at least 4 hours, or overnight, until fully set and cold.

To tell it worked, the filling should be firm enough that a spoon cut leaves a clean edge, and it should not jiggle when you shake the pie gently. If it is still runny after 4 hours, it likely was not cooked long enough; see the table below.

When It Goes Wrong: Thin, Lumpy, or Skinny Filling

Most problems come from undercooking, overcooking the eggs, or not whisking enough. Here is what to check and how to fix it.

SymptomCauseFix
Filling is runny after chillingCornstarch not cooked enough, or too little cornstarchNext time, cook until it bubbles for 1 full minute. If it is already runny, you can whisk in 1 tbsp (8 g) cornstarch dissolved in 2 tbsp (30 ml) cold milk and reheat the filling to a boil, then chill again.
Lumps in the fillingDry ingredients not fully whisked, or milk added too fastWhisk the dry ingredients well before adding liquid. If lumps form, strain the hot filling through a fine-mesh sieve before pouring into the crust.
Scrambled egg bitsHeat too high, or eggs added directly to hot mixtureAlways temper the yolks with cold milk first, and keep heat at medium. If you see bits, strain the filling and whisk vigorously.
Skin on top while chillingPlastic wrap not touching the surfacePress the wrap directly onto the hot filling. If a skin forms, you can stir it back in before serving, but it will be less smooth.

No-Bake Chocolate Pie Filling: Faster but Softer

If you want a filling that skips the stove, melt 8 oz (225 g) semisweet chocolate with 1/2 cup (120 ml) heavy cream, let it cool slightly, then fold in 1 cup (240 ml) whipped cream. This makes a mousse-like filling that sets in about 2 hours but stays softer and needs a sturdy crust. It does not slice as cleanly as the stovetop version, so it is best for a pie you serve with a spoon.

Storing Leftover Chocolate Pie and How Long It Keeps

Cover the pie loosely with foil or plastic wrap and refrigerate within 2 hours of making it. The filling keeps for 3 to 4 days in the fridge. Do not leave it out at room temperature for more than 2 hours total. You can freeze the baked pie for up to 2 months, but the filling may weep slightly when thawed; thaw in the fridge overnight and serve cold. If you have leftover filling that did not fit in the crust, pour it into small ramekins and chill—it makes a quick pudding.

Adjusting Sweetness and Using Different Cocoa

This recipe uses 1 cup (200 g) of sugar, which gives a moderately sweet filling. If you prefer a darker, less sweet chocolate, reduce the sugar to 3/4 cup (150 g) and use Dutch-processed cocoa instead of natural cocoa; Dutch cocoa is less acidic and tastes milder. If you use milk chocolate, reduce the sugar to 1/2 cup (100 g) because milk chocolate is already sweet. For a richer flavor, replace 1/2 cup (120 ml) of the milk with heavy cream, but note that the filling will be slightly less firm.

How to Tell It Worked and What to Do Next

After 4 hours, the filling should be set but still creamy. Insert a spoon at the edge—it should come out clean. If you want to serve it with meringue, add a meringue topping before chilling and brown it in a 375°F (190°C) oven for 5 minutes, then chill again. For a classic finish, top with whipped cream and chocolate shavings just before serving. If the filling is too thick, you can whisk in a splash of milk when reheating leftovers, but it will not return to its original silkiness.

In this article
  1. Before You Start: What You Need and How to Check It
  2. Stovetop Chocolate Pie Filling Sets in About 4 Hours
  3. When It Goes Wrong: Thin, Lumpy, or Skinny Filling
  4. No-Bake Chocolate Pie Filling: Faster but Softer
  5. Storing Leftover Chocolate Pie and How Long It Keeps
  6. Adjusting Sweetness and Using Different Cocoa
  7. How to Tell It Worked and What to Do Next