Qi appears already in the earliest strata of Chinese philosophical writing as the basic stuff of which all things, animate and inanimate, are composed and by which they act; the Huangdi Neijing (Yellow Emperor's Inner Classic), the foundational text of Chinese medicine, treats the free, balanced circulation of qi through the jingluo, the meridian network, as the definition of health, and its obstruction, deficiency or misdirection as the definition of disease. Qi in the body is subdivided by source and function: yuan qi (source qi, inherited from one's parents), gu qi (grain qi, extracted from food), kong qi (air qi, drawn from breath), and derived forms such as wei qi (defensive qi, circulating at the body's surface) and ying qi (nutritive qi, circulating with the blood).
Confucian philosophy from Mencius onward gave qi a moral dimension too, most famously Mencius's haoran zhi qi, "flood-like qi," a vital energy cultivated through righteous conduct rather than breathing technique alone, showing qi was never confined to medicine. The same term and concept, written with the same character, entered Japan as ki and Korea as gi; both retained the Chinese doctrine essentially unchanged, developing their own schools of cultivation and martial application around it rather than a competing definition of what qi itself is.