The invention discloses an electromagnetic flexible composite fused deposition direct preparation forming method for a gradient part. The method comprises the following steps of 1, building a model, wherein functionally graded material CAD/CAM software is applied to build a geometric three-dimensional part model, and material gradient distribution and tissue gradient distribution are determined in the geometric three-dimensional model to form a space comprehensive model; 2, cutting the model into slices and generating numerical control codes, wherein layering and slicing processing is performed on the space comprehensive model formed in the step 1, and numerical control codes are generated; 3, obtaining a reverse solution for electromagnetic characteristics, wherein the reverse solution for externally-added magnetic pole distribution and exciting current characteristics is obtained; 4, performing fused deposition formation, wherein magnetic poles and/or electromagnetic coils are arranged, and fused deposition formation is performed layer by layer. According to the electromagnetic flexible composite fused deposition direct preparation forming method, the CAD/CAM software is adopted for determining the part organization and the material gradient distribution; with the combination of electricity-magnetism-heating power multi-physical field coupling control, integrated manufacturing of the gradient organization and gradient material part shape and microstructure is achieved.