The invention belongs to the field of fluorescence spectrum detection, and particularly relates to a method for rapidly measuring major, minor, and trace components in granite by an X-ray fluorescencespectrum. The method comprises the following steps: preparing a sample by using a fusing method, after performing lithium nitrate preoxidation on the sample, selecting a lithium tetraborate and lithium metaborate mixed reagent of which a mass ratio is 12:22 as a fusing agent, using ammonium iodide as a releasing agent, and preparing a fusing piece. A standard substance, such as the granite, is used as a calibration sample, and an elemental analysis range is further enlarged by artificially synthesizing the sample, the absorption enhancement effect between elements is calibrated through a changed theoretical Alpha-coefficient method, and an X-ray fluorescence spectrum method for 15 components of silicon dioxide, aluminum oxide, potassium oxide, sodium oxide, ferric oxide, calcium oxide, magnesium oxide, manganese oxide, phosphorus pentoxide, titanium dioxide, barium, strontium, sulfur, rubidium and zirconium in the granite is established. The method has the advantages of simple pretreatment, rapid detection speed, low cost, simultaneous analysis of major, minor, and trace elements and the like, and is capable of greatly improving the detection efficiency.