Classic Coconut Cream Pie Recipe (Homemade From Scratch)
A silky homemade custard filling, toasted coconut, and a flaky crust — no boxed pudding involved.

Most coconut cream pie problems trace back to the custard. Either it’s cooked too fast and turns lumpy, or it’s undercooked and never fully sets, leaving you with a pie that slides apart the second you cut into it.
This recipe uses a stovetop custard method with a slow, steady approach—cornstarch and egg yolks working together to thicken gently, without scrambling. Combined with full-fat coconut milk and toasted shredded coconut folded right into the filling, it sets into clean slices with real coconut flavor in every bite, not just on top.
Quick Answer
Coconut cream pie is a custard-based pie made by cooking coconut milk, egg yolks, sugar, and cornstarch into a thick pastry cream, folding in toasted coconut, and chilling it in a baked pie crust until fully set. It’s typically topped with whipped cream and more toasted coconut.
Difficulty Level
Intermediate. The crust can be store-bought or homemade, but the custard filling requires attention on the stove—steady whisking and the right heat level are what separate a silky filling from a lumpy one.
Recipe Highlights
- From-scratch custard, no instant pudding mix
- Uses both coconut milk and toasted coconut for deep flavor
- A blind-baked crust stays crisp under the filling
- Chills into clean, sliceable pieces
- Topped with fresh whipped cream and toasted coconut
Ingredient Notes
Coconut milk: Use full-fat canned coconut milk, not the thinner carton variety sold for drinking — the higher fat content is what gives the custard its rich texture and real coconut flavor.
Egg yolks: These thicken the custard and give it a rich, silky texture. Save the whites for another use; they aren’t needed here.
Cornstarch: Works alongside the egg yolks to set the custard firmly enough to slice cleanly. Don’t reduce the amount, or the pie may be too soft to hold its shape.
Shredded coconut: Toast it before adding it to the filling and for the topping—raw shredded coconut tastes flat compared to toasted, which brings out a deeper, nuttier coconut flavor.
Ingredients

Crust
- 1 pre-baked 9-inch pie crust (homemade or store-bought)
Custard Filling
- 2 cups full-fat canned coconut milk
- 1 cup whole milk
- 2/3 cup granulated sugar
- 1/3 cup cornstarch
- 1/4 teaspoon salt
- 4 large egg yolks
- 2 tablespoons unsalted butter
- 1 teaspoon vanilla extract
- 1 cup shredded coconut, toasted
Topping
- 1 1/2 cups cold heavy whipping cream
- 2 tablespoons powdered sugar
- 1/2 cup shredded coconut, toasted
Step-by-Step Instructions
Step 1—Toast the Coconut
Preheat your oven to 325°F. Spread the shredded coconut on a baking sheet in a thin layer and toast for 6–9 minutes, stirring every 2 minutes, until golden brown. Watch closely near the end—coconut goes from golden to burnt quickly. Set aside to cool, keeping the portions for filling and topping separate.
Step 2 — Cook the Custard Base
In a medium saucepan, whisk together the sugar, cornstarch, and salt. Gradually whisk in the coconut milk and whole milk until smooth, with no dry lumps remaining. Place over medium heat and cook, whisking constantly, until the mixture starts to thicken, about 6–8 minutes.
The first time I rushed this step over higher heat, the custard scrambled slightly at the bottom. Medium heat and constant whisking takes a bit longer, but it’s worth it for a smooth result.
Step 3 — Temper and Finish the Custard
In a separate bowl, whisk the egg yolks. Slowly pour about 1/2 cup of the hot milk mixture into the yolks while whisking constantly to temper them without scrambling. Pour the tempered yolks back into the saucepan and cook over medium-low heat, whisking constantly, for another 2–3 minutes until very thick—it should coat the back of a spoon heavily.
Remove from heat and stir in the butter, vanilla, and 1 cup of the toasted coconut.
Step 4 — Chill the Filling
Pour the custard into the pre-baked pie crust, spreading it into an even layer. Press a piece of plastic wrap directly onto the surface of the custard to prevent a skin from forming. Refrigerate for at least 4 hours, ideally overnight, until fully set.
I know it’s tempting to slice into it after just an hour or two, but the filling really does need the full chill time to firm up enough to hold a clean slice.
Step 5 — Top and Serve
Just before serving, beat the cold heavy cream with powdered sugar until it holds soft peaks. Spread or pipe over the chilled pie and sprinkle with the remaining toasted coconut. Slice with a sharp knife, wiping the blade between cuts for the cleanest edges.
Expert Tips
- Whisk constantly while the custard cooks. Stepping away, even briefly, is the most common cause of lumps.
- Use a heavy-bottomed saucepan for more even heat distribution and less risk of scorching.
- Don’t skip the plastic wrap step. Pressing it onto the custard surface prevents a rubbery skin from forming as it chills.
- Toast extra coconut. It’s easy to overtoast small batches, so toasting a little more than you need gives you a buffer.
Common Mistakes
Mistake 1 — Lumpy Custard
Cause: Cooking over heat that’s too high, or not whisking constantly.
Fix: Keep the heat at medium and whisk the entire time the custard is on the stove. If small lumps do form, strain the custard through a fine-mesh sieve before pouring it into the crust.
Mistake 2 — Pie Won’t Set / Slices Fall Apart
Cause: Not chilling long enough or reducing the cornstarch amount.
Fix: Chill for a full 4 hours minimum, and don’t adjust the cornstarch measurement.
Mistake 3 — Soggy Bottom Crust
Cause: Pouring warm custard into the crust or an under-baked crust to begin with.
Fix: Make sure the crust is fully blind-baked and golden before filling, and let the custard cool slightly at room temperature for 10–15 minutes before pouring it in.
FAQ
Can I use a graham cracker crust instead?
Yes. A toasted graham cracker crust pairs very well with the coconut custard and doesn’t require blind baking the same way a pastry crust does.
Can I make this ahead of time?
Yes, this pie is actually best made a day ahead, since the filling needs several hours to set fully. Add the whipped cream topping just before serving.
Can I freeze coconut cream pie?
This isn’t recommended. The custard filling and whipped cream topping both change texture significantly after freezing and thawing, becoming watery and separated.
Why is my filling still runny after chilling?
This usually means the custard wasn’t cooked long enough on the stove before it went into the crust. It should be very thick, coating the back of a spoon heavily, before it’s poured in.
Storage and Reheating
Room Temperature
Do not leave this pie at room temperature for more than 2 hours due to the egg-based custard filling.
Refrigerator
Store covered in the refrigerator for up to 3 days.
Freezer
Freezing is not recommended; the custard and whipped cream both break down in texture.
Reheating
This pie is served cold and does not need reheating.
Variations
Chocolate-Coconut Cream Pie
Spread a thin layer of melted dark chocolate over the baked crust and let it set before adding the custard filling.
Toasted Almond Coconut Pie
Fold 1/4 cup of chopped toasted almonds into the custard along with the coconut for added crunch.
Coconut Meringue Pie
Top the chilled custard with a classic meringue instead of whipped cream, then brown it briefly under the broiler before serving.
Nutrition
Estimated per serving, based on 8 servings:
- Calories: 420
- Protein: 6g
- Carbohydrates: 34g
- Fat: 29g
- Sodium: 230mg
After testing multiple ingredient combinations and baking methods, this version consistently delivered the crispiest base and best texture. The simple pre-bake step made the biggest difference in every batch.
.




