At present, a wide range of molecular sex-typing protocols in wild and domestic animals are available. In pigs, most of these methods are based on PCR amplification of X-Y homologous genes followed by gel electrophoresis which is time-consuming and in some cases expensive. In this paper, we describe, for the first time, a SYBR green-based quantitative real-time PCR (qPCR) assay using an X-linked gene, the glycoprotein M6B, for genetic sexing of pigs. Taking into account the differences in the glycoprotein M6B gene copy number between genders, we determine the correct sex of 54 pig samples from either diaphragm or hair follicle from different breeds using the 2(-ΔΔCT) method for relative quantification. Our qPCR assay represents a quick, inexpensive, and reliable tool for sex determination in pigs. This new protocol could be easily adapted to other species in which the sex determination was required.