In a medium saucepan, add the cocoa powder, cornstarch, sugar, egg yolks, vanilla extract, and a pinch of salt. Whisk together until smooth and well combined.
Slowly pour in the milk while whisking continuously. This helps prevent lumps and creates a smooth filling.
Place the saucepan over medium heat. Cook the mixture, stirring constantly with a whisk or spoon to prevent it from sticking or burning.
As the mixture heats, it will begin to thicken. Continue stirring until it reaches a thick, pudding-like consistency and the surface looks smooth with very few bubbles. This should take about 8–10 minutes.
Once thickened, remove the saucepan from the heat. Give the filling one final stir to ensure it is smooth.
Pour the hot cocoa filling into the prepared pre-baked pie crust. Use a spatula to spread it evenly.
Let the pie cool at room temperature for about 30–45 minutes.
Once slightly cooled, transfer the pie to the refrigerator and chill for at least 3–4 hours, or until fully set.
Slice and serve chilled.
Enjoy!