Food

How to Make Coconut Cream Pie from Scratch

By Hayride Live · Updated · 5 min read

You’ll have a silky, coconut-packed pie with a crisp crust and fluffy topping in about 4 hours, most of it chilling time. The filling is a classic cooked custard thickened with cornstarch, so it sets firmly enough to slice cleanly. Plan for 20 minutes of prep, 15 minutes of cooking, and at least 3 hours of chilling before serving.

Before You Start: What You Need

Check your pantry before you begin. You’ll need a 9-inch (23 cm) pie dish, a medium saucepan, a whisk, and a mixing bowl. The filling uses basic ingredients, but the coconut milk and shredded coconut are the stars.

  • 1 pre-baked 9-inch (23 cm) pie crust (store-bought or homemade, fully cooled)
  • 1 can (13.5 oz / 400 ml) full-fat coconut milk
  • 1 cup (240 ml) whole milk
  • 3/4 cup (150 g) granulated sugar
  • 1/4 cup (30 g) cornstarch
  • 1/4 teaspoon salt
  • 4 large egg yolks
  • 2 tablespoons (30 g) unsalted butter, cut into small pieces
  • 1 teaspoon vanilla extract
  • 1 cup (85 g) sweetened shredded coconut, plus more for topping
  • 1 1/2 cups (360 ml) heavy cream
  • 2 tablespoons (15 g) powdered sugar

If you don’t have coconut milk, you can use all whole milk (2 cups / 480 ml total), but the pie will be less coconut-forward. Use unsweetened shredded coconut if you prefer a less sweet filling; the custard will still be sweet from the sugar.

How to Make the Coconut Custard Filling

The filling is a stirred custard, not a baked one. You cook it on the stovetop until it thickens, then pour it into the crust. The key is to whisk constantly so the eggs don’t scramble.

  1. In a medium bowl, whisk together the egg yolks, sugar, cornstarch, and salt until smooth and pale yellow, about 1 minute.
  2. In a medium saucepan, combine the coconut milk and whole milk. Heat over medium heat until steaming, but not boiling, about 3-4 minutes.
  3. Slowly pour about 1 cup (240 ml) of the hot milk into the egg mixture, whisking constantly. This tempers the eggs so they don’t curdle.
  4. Pour the egg-milk mixture back into the saucepan with the remaining milk. Return to medium heat and cook, whisking constantly, until the mixture thickens and comes to a gentle boil, about 5-7 minutes. It should be thick enough to coat the back of a spoon.
  5. Once boiling, cook for 1 minute more, still whisking, to ensure the cornstarch is fully cooked and the custard won’t taste starchy.
  6. Remove from heat and stir in the butter, vanilla, and 1 cup (85 g) shredded coconut. Stir until the butter is melted and the coconut is evenly distributed.
  7. Pour the hot filling into the pre-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 3 hours, or until fully set and cold. The filling will firm up as it chills.

How to Top the Pie with Whipped Cream

Once the filling is cold and set, you can add the whipped cream. Do this right before serving so the cream stays fluffy. If you add it too early, the cream can weep or deflate.

  1. In a chilled mixing bowl, beat the heavy cream and powdered sugar with an electric mixer on medium-high speed until soft peaks form, about 2-3 minutes. Soft peaks hold their shape briefly but droop at the tips.
  2. Spread the whipped cream over the chilled filling, or pipe it in swirls using a piping bag with a star tip.
  3. Sprinkle the top with extra shredded coconut, toasted or untoasted. To toast coconut, spread it on a baking sheet and bake at 350°F (175°C) for 5-7 minutes, stirring once, until golden. Watch it closely because it burns quickly.
  4. Serve immediately, or refrigerate for up to 2 hours before serving.

How Long Does Coconut Cream Pie Keep?

Because this pie contains eggs and dairy, it must be refrigerated. Store it loosely covered in the refrigerator for up to 3 days. After that, the crust can get soggy and the whipped cream may weep. Do not leave it at room temperature for more than 2 hours total.

You can freeze the pie without the whipped cream topping for up to 1 month. Wrap the chilled, unfrosted pie tightly in plastic wrap, then foil. Thaw it in the refrigerator overnight, then add the whipped cream before serving. The crust may soften a bit after freezing, but the filling will still taste great.

Why Is My Filling Runny or Lumpy?

If your filling is runny, it likely didn’t cook long enough. The custard must reach a gentle boil and cook for a full minute after boiling. If you stop too early, the cornstarch won’t activate fully. If it’s lumpy, the eggs curdled from adding hot milk too quickly or from not whisking constantly. To fix lumps, you can strain the hot custard through a fine-mesh sieve before pouring it into the crust, but that won’t fix a runny filling.

If your filling is too thick after chilling, it may have cooked too long. A slightly over-thick custard is still fine to eat, just harder to slice neatly. Next time, pull it off the heat right after the 1-minute boil.

Can I Use a Graham Cracker Crust Instead?

Yes, a graham cracker crust works well and adds a sweet, buttery contrast. Use a 9-inch (23 cm) store-bought or homemade graham cracker crust that is already set. You don’t need to pre-bake it again. The coconut custard will fill it the same way. A traditional pastry crust gives a flakier, more classic pie texture, but graham cracker is faster and holds up fine.

Can I Make This Pie Ahead of Time?

Yes, you can make the whole pie, including the whipped cream, up to 1 day ahead. Assemble it completely, then cover loosely with plastic wrap and refrigerate. The whipped cream may soften slightly, but it will still hold. For the best texture, add the whipped cream within 2 hours of serving. If you need to make it further ahead, freeze the unfrosted pie as described above.

What If I Don’t Have Coconut Milk?

You can substitute the coconut milk with an equal amount of whole milk, but the pie will taste more like a vanilla cream pie with coconut flakes. To boost the coconut flavor without coconut milk, add 1/2 teaspoon coconut extract along with the vanilla. Or, you can use full-fat canned coconut cream (not cream of coconut, which is sweetened) mixed with enough milk to make 1 cup (240 ml).

How to Check If the Filling Is Set

After 3 hours of chilling, gently jiggle the pie. The center should be firm and not wobble like liquid. If you press the surface with a finger, it should feel springy, not squishy. If it’s still wobbly, refrigerate for another hour. The filling will continue to set as it chills, so don’t rush it.

Spotted a mistake? Tell us and we will correct it. How we write and check articles.