Huangdi wen Xuannü bingfa 黃帝問玄女兵法 "The Mysterious Maiden's instructions on war to the Yellow Emperor", also called Huangdi bingfa 黃帝兵法 "The art of war of the Yellow Emperor" is a military treatise compiled during the Qing period 清 (1644-1911) by Hong Yixuan 洪頤煊 xxx on the base of older fragments. It is not possible to know the exact compilation date. The book is first mentioned in the imperial bibliography Jingji zhi 經籍志 of the official dynastic history Suishu 隋書, where a length of 4 juan is indicated. In later bibliographies, after the Tang period 唐 (618-907), a length of only 3 juan is given. The original text was lost at an early date.
There is a long tradition to associate the Yellow Emperor with war. The official dynastic history Hanshu 漢書 lists a 3 juan-long book Huangdi shiliu pian 黃帝十六篇, with illustrations, the Suishu the books Huangdi bingfa guxu zaji 黃帝兵法孤虛雜記, Huangdi bingfa zayao jue 黃帝兵法雜要訣, Huangdi junchu dashi nianming licheng 黃帝軍出大師年命立成, Huangdi taiyi bingli 黃帝太一兵歷, and Huangdi Chiyou Fenghou xingjun mishu 黃帝蚩尤風后行軍秘術, in 2 juan. A commentary says that there was still a book Huangdi Chiyou bingfa 黃帝蚩尤兵法 existing during the Liang period 梁 (502-557), but lost in the 7th century. For the Huangdi wen Xuannü bingfa, a commentary also gives the Liang period as the date, when such a book was listed in the imperial library catalogs. The dynastic history Jiutangshu 舊唐書 lists a book called Huangdi taigong sangong fa yaojue 黃帝太公三宮法要訣. Although nothing of these texts has survived, it can be seen that during that age military books were often associated with the Yellow Emperor and his campaign against a putative tyrant called Chiyou 蚩尤.