Hiccups reveal at least two layers of our history: one shared with fish, another with amphibians, according to one well-supported hypothesis. We inherited the major nerves we use in breathing from fish. One set of nerves, the phrenic, extends from the base of the skull and travels through the chest cavity and the diaphragm, among other places. This tortuous course creates problems; anything that interrupts the path of these nerves along their length can interfere with our ability to breathe. Irritation of these nerves can even be a cause of hiccups. A more rational design of the human body would have the nerves traveling not from the neck but from a spot nearer to the diaphragm. Unluckily, we became heir to this design from fishy ancestors with gills closer to a diaphragm well below it.
If the strange pathway of the nerves is a product of our fish origin, the hiccup itself may have arisen from the past we share with amphibians. It turns out that the characteristic pattern of muscle and nerve activity of hiccups occurs naturally in other creatures. And not just any creatures. More specifically, they turn up in tadpoles that use both lungs and gills to breathe. When tadpoles use their gills, they have a problem they need to pump water into their mouth and throat and then across the gills, but they need to keep this water from entering their lungs. So what do they do? They shut the glottis to close off the breathing tube, while sharply inspiring. In essence, they breathe with their gills using an extended form of hiccup.
http://www.mukto-mona.com/Special_Event_/Darwin_day/2009/english/SA_old_bodyShubin.pdf