Cakes & pastry
Chocolate Custard with Cocoa
Chocolate custard gets its cocoa flavour from a cooked milk-and-egg base, not from melted chocolate. Mix cornflour into a reserved portion of cold milk, add it to the hot cocoa mixture, and cook until thick. Stir in butter at the end, then cover the surface and cool promptly.
4 min read

A cooked cocoa filling, not ganache
Ganache sets through its chocolate-and-liquid balance. This custard relies on eggs and cornflour cooked in milk, with cocoa supplying the chocolate flavour. It is useful for layered cakes, choux pastries and crisp pastry tubes when you want a cooked cream.
Use unsweetened cocoa rather than a drinking-chocolate mix. A darker alkalised cocoa gives a stronger colour, but cocoa types vary in flavour. Keep the 15 g amount for the first batch before adjusting your preferred flavour.
Cook with a separate cornflour slurry
Cocoa custard
Ingredients
- 300 g whole milk, divided into 200 g and 100 g
- 180 g sugar
- 2 eggs
- 30 g cornflour (cornstarch)
- 70 g unsalted butter, about 82% fat
- 15 g unsweetened cocoa powder
Method
- Mix the cocoa base. Put the sugar and eggs in a heavy saucepan and whisk together. Add the cocoa and work it in thoroughly.
- Add most of the milk. Stir 200 g of the milk into the cocoa mixture until uniform.
- Make the slurry. Mix the remaining 100 g cold milk with the cornflour in a separate bowl. Stir again immediately before using because starch settles.
- Heat and thicken. Heat the cocoa mixture with constant stirring until it comes to a boil. While whisking, pour in the cornflour slurry in a thin stream.
- Cook through. Continue stirring until the custard thickens. Once the first bubbles appear through the thickened mixture, cook for another couple of minutes, keeping the bottom and edges moving.
- Finish with butter. Remove from the heat and mix in the butter until fully incorporated.
- Cool. Transfer to a shallow container, cover directly at the surface, cool promptly and refrigerate. Stir smooth before using as a filling.
The sugar amount is 180 g in this formula. Changing it substantially changes sweetness and texture, so treat a reduced-sugar version as a separate test.

Disperse cocoa before the mixture thickens
Cocoa is easier to disperse in the egg mixture before the pan is hot. If lumps remain, work them out at that stage. A brief use of an immersion blender can help make the uncooked base uniform, keeping the blade submerged to avoid unnecessary air.
Cornflour should meet cold milk first. Adding dry starch directly to a hot thickening custard can create lumps with dry centres. The reserved cold milk also makes the slurry easy to pour.
Whole milk is the intended liquid. Replacing it with cream makes a richer but different formula; do not assume 20% or 33% cream behaves identically just because it is also dairy.
Keep the thickening even
The cream cooks fastest where it touches the hot pan. Stir from the bottom and along the corners, not only through the centre. A heavy saucepan reduces sharp hot spots but does not remove the need to stir.
After the starch goes in, the texture changes quickly. Watch for bubbles through the thickened custard, then give the starch its brief further cooking period. A surface that merely looks warm is not the same endpoint.
Butter goes in after the cooking stage, while the custard is still hot. Mix until no separate oily streaks remain. If the base has caught and tastes burnt, adding butter or extra cocoa cannot reliably remove that flavour.

Choose a correction based on the filling type and what went wrong.
Cool before filling the pastry
Covering directly at the surface limits skin formation while the custard cools. Use a shallow container for faster cooling, then refrigerate. Stir the chilled cream smooth before transferring it to a piping bag.
Fill fully cooled eclair shells or use measured layers between cooled cakes. Crisp pastry softens as it absorbs moisture, so fill close to serving when crispness is important. Keep filled dairy-and-egg desserts refrigerated.
The same custard can provide a cocoa contrast in a honey-layer cake, but account for the whole dessert’s sweetness. Changing both the cake and filling at once makes it harder to understand which adjustment affected the finished balance.
Common questions
Is this made with melted chocolate?
No. The flavour comes from 15 g cocoa powder; eggs and cornflour thicken the milk base.
Why reserve some cold milk?
It makes a smooth cornflour slurry that can disperse into the hot base without dry starch lumps.
Can I use potato starch?
The formula is written for cornflour. Another starch can change the texture and should be treated as a separate test.
Should I fill eclairs while the custard is warm?
Cool both the custard and shells completely first, then keep the filled eclairs refrigerated.
