The invention provides a method which is used for measuring the octane value of petrol, based on the dielectric spectroscopy, and which relates to a method which adopts the dielectric spectroscopy to build a correction model of petrol of different compositions. The model is used for measuring the octane value of petrol. The method includes the following steps: 1, collecting modeling samples and data of dielectric spectroscopy; 2, pre-treating the modeling samples and the data of dielectric spectroscopy; 3, classifying the modeling samples; 4, respectively building correction models of various categories according to the results of cluster analysis; 5, verifying and correcting the correction model; and 6, predicting the unknown octane of the samples. The octane value of petrol is an indicator which is used for measuring the anti-knock performance of the petrol. The measurement method of the octane value of petrol has significance in the production and application of the petrol. The method can rapidly and efficiently determine the octane value of petrol within 5 minutes; the detection process is conducive to environmental protection; the samples require no pre-treatment; the analysis has the advantages of high speed and high reliability; the method can be used conveniently; and the costs of analysis are low.