This paper based on the analysis of the basic meaning in data mining and the structure of decision tree uses the decision tree algorithm — C4.5 to establish a soil quality grade prediction model and combines the soil composition in Lishu to be a training sample. C4.5 algorithm also expresses the acquired knowledge by means of quantitative rules. The experiment results manifest that the expression of C4.5 algorithm's knowledge is easy to understand, is convenient for practical application, improves forecasting accuracy and provides a reliable theoretical basis for precision fertilization.