The invention discloses a method for rapidly detecting expression of ANS (Anthocyanidin Synthetase) genes from different sources in rape seed capsules. In the method, a specific primer capable of distinguishing ANS genes from chromosome sets A, B and C by cloning and analyzing sequences of ANS genes in three elementary species of rape (cabbage: the chromosome set is AA, and 2n=20; brassica oleracea: the chromosome set is CC, and 2n=18; and brown mustard: the chromosome set is BB, and 2n=16) and three allotetraploids (mustard type rape: the chromosome set is AABBA, and 2n=36; cabbage type rape: the chromosome set is AACC, and 2n=38; brassica carinata: the chromosome set is BBCC, and 2n=34) according to the nucleotide polymorphic loci of ANS genes from the chromosome sets A, B and C, and the ANS gene types expressed in the seed capsules of rape of different chromosome set types are identified in combination with an RT-PCR (Reverse Transcriptase-Polymerase Chain Reaction). The method plays a role in further researching the molecular adjusting mechanism for the color formation of rapeseed capsules and accelerating the variety breeding of yellow seed rape; and meanwhile, a novel methodfor detecting the source of a rape ANS gene is provided.