A method for weaving a three-dimensional preform having a gradient structure, comprising the following steps: (a) according to application environment, operating mode and loading condition of composite material parts, dividing and determining performance requirements of different functional locations of the parts, and determining a transition area; (b) according to the performance requirements of the different functional locations of the parts, selecting different varieties and specifications of guide sleeves and fibers, and designing different arrangement manners and arrangement spaces of the guide sleeves, winding manners of fibers and densities of winding layers of the fibers; (c) designing varieties, specifications, arrangement manners and arrangement spaces of guide sleeves in the transition area, and designing varieties, specifications and winding manners of fibers as well as densities of winding layers in the transition area, thereby implementing smooth transition of the transition area; (d) determining a weaving sequence in a computer according to layouts of the guide sleeves, the winding manners of the fibers on the functional locations and in the transition areas, then generate a fiber iterative instruction for layer-by-layer weaving; (e) arranging guide sleeves according to design requirements of the functional locations and the transition areas and then generate a guide sleeve array; (f) driving a weaving mechanism to select different fibers for subarea weaving layer by layer in the guide sleeve array till the weaving of all fiber layers is finished to obtain the three-dimensional preform having a gradient structure. (a) according to application environment, operating mode and loading condition of composite material parts, dividing and determining performance requirements of different functional locations of the parts, and determining a transition area; (b) according to the performance requirements of the different functional locations of the parts, selecting different varieties and specifications of guide sleeves and fibers, and designing different arrangement manners and arrangement spaces of the guide sleeves, winding manners of fibers and densities of winding layers of the fibers; (c) designing varieties, specifications, arrangement manners and arrangement spaces of guide sleeves in the transition area, and designing varieties, specifications and winding manners of fibers as well as densities of winding layers in the transition area, thereby implementing smooth transition of the transition area; (d) determining a weaving sequence in a computer according to layouts of the guide sleeves, the winding manners of the fibers on the functional locations and in the transition areas, then generate a fiber iterative instruction for layer-by-layer weaving; (e) arranging guide sleeves according to design requirements of the functional locations and the transition areas and then generate a guide sleeve array; (f) driving a weaving mechanism to select different fibers for subarea weaving layer by layer in the guide sleeve array till the weaving of all fiber layers is finished to obtain the three-dimensional preform having a gradient structure. <EOS>