The invention relate to SNP and InDel markers associated with a cucumber male sterility gene and a screening method thereof. The cucumber male sterility gene is acquired by screening according to the markers. Specifically, the screening method comprises following steps: (1) configuring groups; (2) building a library and sequencing; (3) adopting bulked segregation analysis (BSA); and (4), performing competitive allele specificity PCR (KASP), finely mapping a sterility gene, and acquiring SNP or InDel locus in close linkage with sterility character. The acquiring of the male sterility gene provides an effective tool for quick identification of cucumber male sterility plants and efficient production of cucumber hybrid species.