Are you heating your coffee in a microwave? If so, the liquid can become superheated - that is, raised above its boiling point without actually boiling. Adding sugar creates nucleation sites on which gas can form, so the liquid suddenly and violently boils.
If you aren't microwaving, then I'm not sure what else could cause such a reaction.
AJCham t1_j2a27fj wrote
Reply to eli5: why does hot coffee erupt when add brown sugar? by DjHalk45
Are you heating your coffee in a microwave? If so, the liquid can become superheated - that is, raised above its boiling point without actually boiling. Adding sugar creates nucleation sites on which gas can form, so the liquid suddenly and violently boils.
If you aren't microwaving, then I'm not sure what else could cause such a reaction.