Gather the essentials for making chocolate barfi like full-fat milk, sugar, cocoa powder, ghee, cardamom powder, and milk powder.
In a non-stick pan, combine milk and sugar, and bring it to a simmer over medium heat.
Once the milk and sugar have mixed well, add cocoa powder for the chocolate flavor.
Slowly add milk powder into the mixture while stirring continuously to prevent lumps.
Continue cooking the mixture on low heat. Keep stirring the mixture until it thickens.
Grease a tray or a flat surface with ghee or butter and pour it into the tray and spread it evenly.
Once the mixture has cooled and set, cut it into squares or diamond shapes. Let it fully set at room temperature.