Xiyanping (XYP) is a Chinese herbal medicine used in the clinic to treat respiratory infection and pneumonia. Recent evidence identified XYP as a potential inhibitor of severe acute respiratory syndrome coronavirus 2, implying XYP as a possible treatment for the coronavirus disease 2019 (COVID‐19). Here, we conducted a prospective, multicenter, open‐label and randomized controlled trial to evaluate the safety and effectiveness of XYP injection in patients with mild to moderate COVID‐19. We consecutively recruited 130 COVID‐19 patients with mild to moderate symptoms from five study sites, and randomized them in 1:1 ratio to receive XYP injection in combination with standard therapy or receive standard supportive therapy alone. We found that XYP injection significantly reduced the time to cough relief, fever resolution and virus clearance. Less patients receiving XYP injection experienced disease progression to the severe stage during the treatment process. No severe adverse events were reported during the study. Taken together, XYP injection is safe and effective in improving the recovery of patients with mild to moderate COVID‐19. However, further studies are warranted to evaluate the efficacy of XYP in an expanded cohort comprising COVID‐19 patients at different disease stages.