Hanfu has a history of more than three millennia, and is said to have been worn by the legendary Yellow Emperor. From the beginning of its history, Hanfu (especially in elite circles) was inseparable from silk, supposedly discovered by the Yellow Emperor’s consort, Leizu. The Shang Dynasty (c.1600 BC-1000 BC), developed the rudiments of Hanfu; it consisted of a yi, a narrow-cuffed, knee-length tunic tied with a sash, and a narrow, ankle-length skirt, called chang, worn with a bixi, a length of fabric that reached the knees. Vivid primary colors and green were used, due to the degree of technology at the time.

The concept of hanfu is distinguished from the broader concept of traditional Chinese clothing. This excludes many changes and innovations in the dress of the Han Chinese people since 1644, the founding of the Qing dynasty, on the basis that such changes were imposed by force (such as through the Queue Order) or adopted through cultural influence from the ruling Manchu ethnicity. Thus, the qipao, while widely regarded as an example of traditional Chinese clothing, is not an example of hanfu since it derives from a Manchu clothing style. Today, most Han Chinese wear Western-style clothing in everyday life. Some urban residents in China wear modified or modernized traditional clothing on some occasions, while many in the countryside still use distinctive peasant dress (though not necessarily identical with classical Hanfu). The only significant population segment which wear hanfu regularly on a day-to-day basis are religious priests and monks.