To establish a cell line stably expressing the transient receptor potential melastatin 2 (TRPM2) channel for screening TRPM2 inhibitors based on PiggyBac transposition system. A plasmid PiggyBac-human TRPM2 (pPB-hTRPM2) eukaryotic expression vector was constructed using PiggyBac transposition system. The plasmid and a helper plasmid were co-transfected into HEK293T cells to express TRPM2, which was identified by fluorescence and patch-clamp assays. The high throughput screening performance was assessed with the Z ´ factor. Calcium imaging and patch clamp techniques were employed to assess the initial activity of eleven compound molecules, confirming the inhibitory effects of the primary molecules on TRPM2. The protective effect of the screened compounds on damaged cells was validated using the oxygen-glucose deprivation/reperfusion (OGD/R) injury model and CCK-8 kit. The level of cellular reactive oxygen species (ROS) was detected by flow cytometry. The neuroprotective effects of the compounds were evaluated using a transient middle cerebral artery occlusion (tMCAO) mouse model. The HEK293T cells transfected with pPB-hTRPM2-EGFP showed high TRPM2 expression. Puromycin-resistant cells, selected through screening, exhibited robust fluorescence. Whole-cell patch results revealed that induced cells displayed classical TRPM2 current characteristics comparable to the control group, showing no significant differences (P>0.05). With a Z ´ factor of 0.5416 in calcium imaging, the model demonstrated suitability for high-throughput screening of TRPM2 inhibitors. Calcium imaging and electrophysiological experiments indicated that compound 6 significantly inhibited the TRPM2 channel. Further experiments showed that 1.0 μmol/L of compound 6 enhanced cell viability (P<0.05) and reduced the level of ROS (P<0.05) of SH-SY5Y under OGD/R injury. 0.3 and 1.0 mg/kg of compound 6 reduced the cerebral infarction volume in tMCAO mice (both P<0.05). A stable TRPM2 gene expressing cell line has been successfully established using PiggyBac gene editing in this study. TRPM2 channel inhibitors were screened through calcium imaging and patch clamp techniques, and an inhibitor compound 6 was identified. This compound can alleviate cell damage after OGD/R by reducing cellular ROS levels and has a protective effect against cerebral ischemia-reperfusion injury in mice.