Inguinal and scrotal hernias are the most frequent congenital disorders in pigs, and they may cause severe economic loss in the pig breeding industry. Genetic factors play a significant role in the susceptibility to hernias, but the genetic mechanisms of inguinal/scrotal hernia are poorly understood. In this study, we performed a genome-wide association study (GWAS) with specific-locus amplified fragment sequencing (SLAF-seq) on 120 (59 cases and 61 controls) full and half sib pigs to identify genetic loci underlying variations in inguinal/scrotal hernias. A total of 218,460 high-quality SNPs were generated for further statistical analysis with casecontrols and the farmCPU model. Based on these two methods, a total of 59 SNPs were significantly (P < 0.01) associated with inguinal/scrotal hernia. Finally, 14 novel candidate genes implicated in the defect were identified, and 5 genes (CPNE5, DEGS1, PLCG2, PRKCE and NUAK1) were related to cell apoptosis, which is one of the pivotal pathogenesis factors of inguinal/scrotal hernia. In addition, 4 of them were shown strong associations with the hernia were confirmed in 270 samples (P < 0.05). This finding provides new evidence that genes related to cell apoptosis may be associated with inguinal/scrotal hernias.