The invention discloses a special primer for detecting a human leucocyte antigen-B27 (HLA-B27) gene. The special primer is characterized by comprising an upstream primer B27-1, a downstream primer B27-2 and a probe B27-probe which are used for detecting target genes, and an upstream primer Gapdh-1, a downstream primer Gapdh-2 and a probe Gapdh-probe which are used for detecting an internal control gene, namely glyceraldehyde-3-phosphate dehydrogenase (GAPDH), wherein the B27-1 is shown as GGGTCTCACACCCTCCAGAAT, the B27-2 is shown as CGGCGGTCCAGGAGCT, and the B27-probe is shown as FAM-TACCACCAGGACGCCTAC-TAMRA; and the Gapdh-1 is shown as CAGGTGGAGCGAGGCTAG, the Gapdh-2 is shown as CTACCCATGACTCAGCTTCTCC, and the Gapdh-probe is shown as HEX-ACCATGCCACAGCCACCACACCTC-BHQ1. The invention also provides a kit for detecting the HLA-B27 gene. A method for detecting the gene by using one pipe replaces the original method for detecting the gene by using two pipes, the amount of samples which can be detected by a machine at a time is increased, and the detection efficiency is improved to a great extent.