Aiming at the difficult to detect arbitrary-angle weld defects, a magneto-optical (MO) imaging non-destructive testing (NDT) system for weld defects excited by different magnetic fields is studied. The mechanism of the alternating magnetic field generated by the U-shaped yoke and the rotating magnetic field produced by the plane cross yoke is introduced, the magnetic field distribution of weld defects is analyzed by using finite element simulation. The MO imaging effects of different weld defects excited by alternating/rotating magnetic field are compared. The relationship between imaging characteristics of MO images and magnetic field strength is analyzed based on the Faraday rotation effect. The gray value of MO image can match the corresponding leakage magnetic field strength. MO imaging NDT experiments are performed on weld defects, including non-penetration, pit, surface crack, and subsurface crack. The principal component analysis (PCA) method is used to extract the grayscale features of the fused image column pixels and the texture features of the MO image are extracted by the gray-level co-occurrence matrix (GLCM). A BP-AdaBoost neural network model and a support vector machine (SVM) model are established to identify these defect features. Experimental results show that the classification accuracy of the BP-AdaBoost neural network model and the SVM model can reach 98.2 % and 98.6 % respectively under the excitation of rotating magnetic field. Compared with the alternating magnetic field, the classification accuracy is improved by 7.5 % and 8.5 %, respectively. MO imaging under rotating magnetic field excitation overcomes the limitation of directional detection of MO imaging under traditional magnetic field excitation, and realizes the detection and classification of arbitrary-angle weld defects.