There are those who will say this phrase originates with the slang, known as Jack Speak, of the British Royal Navy known. Supposedly, JackSpeak refers to the fact that if food is collected from the galley as soon as the appropriate ‘pipe’ sounds, then it is still hot when it’s served.
However, an early citation of the phrase is given in Philemon Holland’s 1601 translation of Pliny’s History of the world: “Beans … fried all whole as they be, and so cast piping hot into sharp vinegar.”
Even earlier than that the expression was first recorded in Chaucer’s 14th Century Canterbury Tales. In the Miller’s Tale, Chaucer wrote: “Wafers piping hot out of the gleed.” The wafer is a kind of thin cake and gleed is the hot coals of a fire.