Disclosed are the use of an Agrimonia pilosa extract in the preparation of a drug for removing a plant virus in tomato plants, and a method for removing the plant virus in the tomato plants using the Agrimonia pilosa extract. Aimed at the problem that currently there is no effective way in production to remove the virus in plants so as to achieve the treatment of viral diseases, the treatment of tomato plants with the Agrimonia pilosa extract can remove the tomato yellow leaf curl virus in tomato plants, which is beneficial to the treatment of viral diseases in plants. The Agrimonia pilosa extract is prepared by the following method: pulverizing traditional Chinese medicine, i.e. Agrimonia pilosa, with a universal pulverizer, weighing 200 g of dry powder into a 1000 mL triangular flask, adding 500 mL of 75% ethanol, leaching for 14 days at room temperature, filtering, concentrating under reduced pressure in a water bath using a rotary evaporator, evaporating the alcohol, obtaining the traditional Chinese medi