In order to achieve transformer fault of fault identification and classification intuitively, this paper proposes a method of transformer fault detection based on PCA (principal component analysis) and KNN (K-Nearest Neighbor) classification and recognition. In this paper, vibration signals from different transformer states are decomposed by EMMD (Ensemble Empirical Mode Decomposition) to abstract feature vectors which are projected onto a visual two-dimensional image. KNN classification is applied to verify fault classification and achieve automatic fault identification. Experimental results show that, this method can achieve classification of a normal state of transformer,winding deformation and the core fault respectively, to realize automatically pattern recognition of test sample.