The invention relates to bacillus velezensis HP-24 and application thereof in preparation of liquid for preventing and treating melon bacterial fruit blotch, which can effectively solve the problem of bacterial liquid for preventing and treating fruit blotch caused by melon pathogenic bacteria Acidovorax citrulli and can realize biological prevention and treatment of fruit blotch. The bacillus velezensis HP-24 is classified and named as bacillus velezensis and is preserved in the China General Microbiological Culture Collection Center (CGMCC), the preservation number is CGMCC NO.22973, the preservation date is July 28, 2021, and the preservation address is Institute of Microbiology, Chinese Academy of Sciences, No.3, No.1 Yard, West Beichen Road, Chaoyang District, Beijing. The bacillus velezensis HP-24 has the function of apoptosis of melon pathogenic bacteria watermelon acidophilus, is effectively used for preparing liquid for preventing and treating melon bacterial fruit blotch, and realizes prevention and treatment of fruit blotch. The bacillus velezensis HP-24 and the application thereof can effectively prevent and treat melon bacterial fruit blotch caused by watermelon acidophilic bacteria, develop a new way for biological prevention and treatment of fruit blotch, and have remarkable economic and social benefits.