Houttuynia cordata Thunb (HCT), an important homologous plant, has extensive medicinal and food value. Traditional Chinese medicine may have therapeutic research value for inhibiting COVID-19 toxicity. HeadSpace Solid Phase Micro-Extraction Gas-Chromatography-Mass-Spectrometry (HS-SPME-GC–MS) was used in this study to examine the edible quality, differences in growth indicators, and metabolite differences of HCT under different cultivation media (soil, sand, peat, hydroponics). Additionally, network pharmacology was used to study the active substances and key targets of Houttuynia cordata against COVID-19. The experimental analysis indicated that hydroponics produced the highest HCT yield and that the soil culture produced the highest growth parameters such as dry rate, chlorophyll content, and vitamin C content. The sand culture produced the highest total protein content, and the peat culture resulted in the highest accumulation of total flavonoids. However, compared with the soilless culture, the soil culture's environment produced more benzene and substituted derivatives and more carboxylic acids and derivatives. Hydroponics reduces the accumulation of harmful metabolites and enhances the accumulation of medicinal components in HCT. In summation, HCT is suitable for soilless cultivation and shows demonstrates strong performance in medicinal quality and growing development under hydroponics.