Objective: To analyze the typing and medication law of infertility in ancient Chinese medical texts based on the Encyclopaedia of Traditional Chinese Medicine using the latent structure models. Methods: The information on prescription medicines for infertility was extracted from the Encyclopaedia of Traditional Chinese Medicine (software). A database was established using Excel 2019 software. IBM SPSS Modeler Subscription 1.0 and Lantern 5.0 software were applied to analyze the association rule analysis, latent structural modeling analysis, and comprehensive clustering analysis of traditional Chinese medicines (TCM) with a frequency Angelica sinensis radix , Rehmanniae radix praeparata , Ginseng radix et rhizoma, Poria, Chuanxiong rhizoma, Cinnamomi cortex .” The efficacy of Chinese medicines involved 19 categories, among which the high-frequency Chinese medicines are tonifying medicinal, blood-activating and stasis-resolving medicinal, and interior-warming medicinal. The statistics of the properties of Chinese medicines showed that the properties of the high-frequency Chinese medicines were warm, neutral, cold, and heat, and the flavors of high-frequency Chinese medicine were sweet, pungent, bitter, and were mainly belonged to the kidney meridian, liver meridian, and spleen meridian. In this study, 11 core association principles for the treatment of infertility were derived, and the main combinations of these were Asari radix et rhizoma + Ginseng radix et rhizoma →Cinnamomi cortex , Cinnamomi cortex + Poria→Ginseng radix et rhizo ma, Atractylodis macrocephalae rhiz oma + Angelica sinensis rad ix→Chuanxiong rhizoma . Conclusion: The medication law of infertility in the Encyclopaedia of Traditional Chinese Medicine mainly manifests the importance of activating blood, warming yang, and tonifying deficiency, and emphasizes the important role in treating infertility through the regulation of the 3 internal organs of the liver, spleen, and kidneys.