With the rapid outbreak of COVID-19, traditional Chinese medicine(TCM) has been playing an active role against the epidemic. However, the screening of TCM is limited by the development cycle and laboratory conditions, which greatly limits the screening speed. This study established optimization docking models and virtual screening to discovery potential active herbs for the prevention and treatment of the novel coronavirus based on molecular docking technology. The crystal structures of 3 CL protease(Mpro) and papain-like protease(PLP) were obtained from PDB database and homologous modeling respectively, and were used to conduct virtual screening of TCMD 2009 database by CDOCKER program. The ingredients scored in the top 100 were selected respectively, and the candidate herbs were ranked by the numbers of hit molecules. Based on Mpro inhibitors screening, 12 322 potential active components were obtained, and the representative active components included aster pentapeptide A, ligustrazine, salvianolic acid B, etc., and Zingiberis Rhizoma Recens, Asteris Radix et Rhizoma, Notoginseng Radix et Rhizoma, Chuanxiong Rhizoma, Salviae Miltiorrhizae Radix et Rhizoma, Zingiberis Rhizoma, Dianthi Herba, Rhei Radix et Rhizoma, Cistanches Herba were obtained. While 11 294 potential active ingredients were obtained by PLP inhibitor screening, representative active ingredients included gingerketophenol, ginkgol alcohol, ferulic acid, etc., and Codonopsis Radix, Notopterygii Rhizoma et Radix, Zingiberis Rhizoma Recens, Ginkgo Semen, Chuanxiong Rhizoma, Trichosanthis Fructus, Paeoniae Radix Alba, Psoraleae Fructus, Sophorae Flavescentis Radix, Notoginseng Radix et Rhizoma, Angelicae Sinensis Radix were chosen. By combining the diagnosis and treatment scheme of Hunan province's and angiotensin converting enzyme 2(ACE2) inhibitors screening from literature, present study also discussed the rational application of candidate herbs to this epidemic situation. Trichosanthis Fructus obtained by PLP inhibitors screening and Fritillaria verticillata obtained by ACE2 inhibitors screening were parts of the Sangbei Zhisou Powder and Xiaoxianxiong Decoction, which might be applicable to the syndromes of cough and dyspnea. Rhei Radix et Rhizoma screened by Mpro and Trichosanthis Fructus screened by PLP were contained in Maxing Shigan Decoction and Xuanbai Chengqi Decoction, and could be applied to the syndromes of epidemic virus blocking lung. Mori Folium, Lonicerae Japonicae Flos and Forsythiae Fructus obtained by ACE2 inhibitors screening were included in the Sangju Decoction and Yinqiaosan, which might be applicable to the syndromes of warm pathogen attacking lung and cough and dyspnea. The results of this study are intended to provide a reference for the further development of traditional Chinese medicine to deal with the new epidemic.