Hiccups are an automatic reflex that may have originated when we were made the transition from being fish to having lungs. The explanation is that the hiccup forces our throat closed on intake to allow us to take in water and push it through gills without taking water into our lungs. Animals like the lungfish still use this reflex.
Normally, this reflex is suppressed, but sometimes it can be turned on. And if it can be stopped within the first few hiccups it is fine, but if it persists it can really be a pain. One man hiccuped for 68 years. The causes of hiccups are varied, but diabetes is implicated. Neuropathy such as damage to the vagus nerve and high blood sugars can set them off. It isn't common, but there are numerous ties between them.
I've never had this happen, but I also don't have blood sugars at that level.