Functionally graded materials (FGMs) with spatially varying material properties in 3D space are highly desired for a wide range of applications. Although FGMs are ubiquitous in biological materials, the fabrication of FGMs with continuous non-linear spatial variation of material properties remains a great challenge. Here we present a self-developed extrusion-based additive manufacturing system capable of fabricating FGMs with sophisticated material property distributions. The workflow involves property function modeling, gray-scale representation and control codes generation, digital material feeding and active multi-material mixing. The effectiveness of the technology is demonstrated by the successful printing of a diverse range of objects with complex spatial variations in color and Al2O3 concentration. In addition, by controlling the dynamic change of the different components during reactive 3D printing process, we can fabricate polyurethane (PU) objects with various gradient patterns in material mechanical properties. The results of the cantilever bending test and simulation show that the material gradient can effectively relieve the stress concentration. The proposed gradient 3D printing system opens a new avenue for manufacturing FGMs with exquisite material property distributions thus far only accessible by biological materials grown in nature.