Spotted knifejaw (Oplegnathus punctatus), one of the most valuable mariculture species, grows with significant sexual dimorphism, with males growing significantly faster than females. O. punctatus not only has excellent growth characteristics and high food value, but also shows high economic value in aquaculture, which has become a hotspot in the field of aquaculture. The current insufficiency of sex marker identification in O. punctatus restricts the process of its unisexual breeding. Rapid identification of sex will help to study the mechanisms of sex determination and accelerate the development of sex-controlled breeding. With the completion of the sequencing of the male and female genomes of O. punctatus, the efficient and precise development of genetic sex markers has been made possible. In this study, we used genome-wide information combined with molecular biology techniques from marker sequences to further establish a rapid method for DNA insertion variant detection in the intron of O. punctatus erc2 gene, which can be used to rapidly, accurately, and efficiently identify whether DNA insertion occurs in the intron of O. punctatus erc2 gene to be detected, and to identify the sex of O. punctatus to be detected. It could also be distinguished by agarose gel electrophoresis, which would shorten the time for accurate identification and improves the detection efficiency. Homozygous comparison of male and female individuals showed that the length of the DNA fragment of the erc2 gene was 239bp on chromosome X1 and 1173bp on chromosome Y. It can therefore be inferred that a 934bp insertion fragment exists on the Y chromosome. The PCR amplification results showed that two DNA fragments of 1173bp and 239bp could be amplified in male O. punctatus, and the 1173bp fragment was a marker fragment specific to the variant intron erc2 gene, while only a single DNA fragment of 239bp was amplified in female O. punctatus. It has important significance and application value in the study of neurotransmitter transmission and environmental adaptability of female and male fish based on erc2 gene, as well as the identification of male and female sex, the preparation of high male fry, and family breeding.