Objective To analyze the medication rules of traditional Chinese medicine (TCM) oral prescriptions for the prevention of COVID-19. Methods The preventive oral prescriptions for COVID-19 published by national and provincial health and wellness committees, administrations of TCM, medical institutions at all levels, and medical masters and Chinese medicine experts were collected to establish a database, manual screening was carried out according to the inclusion and exclusion criteria, and frequency statistics, association rule analysis. The mutual information method, entropy hierarchical clustering and other methods were improved through Excel and the TCM inheritance auxiliary platform V2.5 to mine the rules and characteristics of medication. Results The selected 157 prescriptions contained a total of 130 TCMs. The top five TCMs with the highest use frequency were Glycyrrhizae Radix et Rhizoma (86), Astragali Radix (80), Lonicerea Japonicae Flos (70), Atractylodis Macrocephalae Rhizoma (62), Saposhnikoviae Radix (60). In accordance with TCM efficacy classification, most of them were medicines for qi-tonifying (279), followed by medicines for clearing heat and drying dampness (163), dispelling pathogenic wind-cold (126), resolving dampness (111), as well as dispelling pathogenic wind-heat (99). The characteristics of four-natures of the selected medicines are as follows: most of them were cold (59), followed by warm (38) and mild (21). In terms of five-taste, most of them were sweet (26) and acrid-and-bitter (24), followed by sweet-and-bitter (20), bitter (20) and acrid (15). For the meridian attribution, the five-zang organs and six-fu organs were all involved, most of them attributed to lung meridian (80), followed by stomach meridian (57) and spleen meridian (40). Based on association rule analysis, 12 commonly used medicine combinations with two or three TCMs were found. The commonly used medicinal pairs included Astragali Radix and Saposhnikoviae Radix (51), Astragali Radix and Atractylodis Macrocephalae Rhizoma (46), Atractylodis Macrocephalae Rhizoma and Saposhnikoviae Radix (43), Astragali Radix and Atractylodis Macrocephalae Rhizoma and Saposhnikoviae Radix (38), Forsythiae Fructus and Astragali Radix (37), and so on. In addition, 14 core combinations of medicines were obtained by complex system entropy cluster analysis, on this basis, six new prescriptions were screened out based on unsupervised entropy hierarchical clustering analysis. According to The Catalogue of Edible Traditional Chinese Medicinal Materials, Traditional Chinese Medicinal Materials for Health Food, and New Resources of Food published by National Health Commission of the People's Republic of China, there are 35 species belonging to the group of edible traditional Chinese medicinal materials, 20 species belonging to the group of new resources of food, 31 species belonging to the group of traditional Chinese medicinal materials for health food, 19.11% of the preventive oral prescriptions for COVID-19 were composed of the medicines belonging to the above three groups. Besides, there are 11 toxic species, and 24.84% of the preventive oral prescriptions for COVID-19 contained toxic traditional Chinese medicines. Conclusion We found that invigorating qi and resolving dampness were the main treatment used to prevent for COVID-19, combined with the methods for strengthening vital energy and eliminating pathogenic factors. Most of the preventive oral prescriptions for COVID-19 were treated in lung, spleen and stomach meridians. In the process of selecting prescriptions and using TCMs to prevent for COVID-19, the safety of preventive medicines was also emphasized. And the theory of "Preventive Treatment of Disease" was embodied in these preventive oral prescriptions for COVID-19. For the prescriptions containing toxic TCMs, special attention should be paid to their safety in clinical application.