The invention provides a text classification method based on correlation analysis and a KNN, and the text classification method is used for solving the problem that the efficiency and the accuracy of text classification method based on a traditional KNN need to be further improved. The text classification method is a strategic method, the fact that much coincidence of the characteristic attribute of a tested document and the characteristic attribute of neighbor documents exists is taken into consideration, according to the text classification method based on correlation analysis and the KNN, based on results obtained after correlation analysis is conducted on all classes of documents, a neighbor number k which is suitable for a document of an unknown class is quickly determined, k neighborhoods are selected from documents of unknown classes, therefore, the class of the unknown document is determined according to the classes of the neighborhoods, the defects that according to the text classification method based on the traditional KNN, the value of k is difficult to determine and the time complexity is high are overcome, and the efficiency and the accuracy of text classification are improved.