The report said the man, an unidentified 54-year-old from Massachusetts, had consumed one to two large bags of black licorice a day for three weeks. That habit caused his potassium levels to drop precipitously, prompting a cardiac arrest, according to the study. He never regained consciousness after his collapse and died about 24 hours after he arrived at Massachusetts General Hospital.

“We almost didn’t believe it when we figured it out,” said Dr. Jacqueline B. Henson, who treated the man while she was a resident at the hospital. “We were all shocked and surprised.”

Aspiring doctors are taught in medical school that black licorice contains glycyrrhizic acid, a plant extract that is often used as a sweetener in candies and other foods and can lead to dangerously low potassium levels if it is consumed in high enough doses. But it is rare to see a case of someone dying as a result of ingesting too much of the candy, Dr. Henson said.