The recognition of pollen and pistil in the self-incompatibility process is generally determined by the interaction between the pollen S gene and pistil S gene located at the S locus. However, the regulatory mechanism of self-incompatibility in goji remains unknown. In this study, we used the self-compatible strain ‘13–19’ and self-incompatible strain ‘xin9’ from Ningxia as parents to create an F1 hybrid population. Reciprocal cross-pollination was performed within the same plant to evaluate the self-compatibility of the parents and F1 progeny. The parents and progeny were subjected to whole-genome resequencing, and mixed pools of DNA were constructed using 30 self-compatible and 30 self-incompatible individuals. Association analysis using the SNP-index method and Euclidean distance was employed to identify the key candidate region of the S locus. The candidate region was further annotated using the Swiss-Prot database to identify genes within the region. Additionally, transcriptome sequencing data from different organs/tissues, as well as from pistils of self-compatible and self-incompatible strains at control (0 h), short (0.5 h), medium (8 h), and long (48 h) time points after self-pollination and cross-pollination, were analyzed to assess differential gene expression and screen for self-compatibility-related loci. Specific primers were designed for PCR amplification to determine the S-RNase genotypes of the extreme parents. The results revealed that the S locus in goji is located within a 32.2 Mb region on chromosome 2 that contains a total of 108 annotated genes. Differential expression analysis showed that ten genes, including Lba02g01064, were specifically expressed in stamens, with four of them annotated as F-box genes, potentially serving as determinants of self-compatibility in stamens. Lba02g01102 was exclusively expressed in pistils and annotated as an S-RNase gene, likely involved in self-compatibility. The expression of Lba02g01102 in pistils decreased after self-pollination and cross-pollination. Six candidate genes exhibited significant changes after self-pollination and cross-pollination. Both parents and progeny carried two S-RNase alleles, and the S-RNase genotypes showed a significant correlation with self-compatibility, with the self-compatible progeny containing the S8-RNase allele. The identification of the S locus in goji provides molecular markers for future marker-assisted breeding and offers genetic resources for studying the mechanism of self-incompatibility in goji, thus contributing to the improvement of goji varieties.