Breast cancer is a common malignant tumor, which mostly occurs in female population and is caused by excessive proliferation of breast epithelial cells. Breast cancer can cause nipple discharge, breast lumps and other symptoms, but these symptoms lack certain specificity and are easily confused with other diseases, thus affecting the early treatment of the disease. Once the tumor progresses to the advanced stage, distant metastasis can occur, leading to dysfunction of the affected organs, and even threatening the patients’ lives. In this study, we synthesized high drug-loading gel particles and applied them to control the release of insoluble drugs. This method is simple to prepare, cost-effective, and validates their potential in breast cancer therapy. We first characterized the morphology and physicochemical properties of gel loaded with newly synthesized compound 1 by scanning electron microscopy (SEM), Fourier-transform infrared spectroscopy (FT-IR), and thermal gravimetric analysis (TGA). Using newly synthesized insoluble compound 1 as a model drug, its efficacy in treating breast cancer was investigated. The results showed that hydrogel@compound 1 was able to significantly inhibit the proliferation, migration and invasion of breast cancer cells. Additionally, we utilized machine learning to screen three structurally similar compounds, which showed promising therapeutic effects, providing a new approach for the development of novel small-molecule drugs.