Functionally graded foams (FGFs) were in-situ fabricated via material extrusion (MEX) additive manufacturing (AM) process. Foamable filaments loaded with thermally expandable microspheres (TEMs) at 8.0 wt% was first fabricated using a single screw extruder. The correlations between the resultant foam density and process factors, namely nozzle temperature (NT) and flow rate (FR) were established using a statistical analysis and the density predictability of the model was verified by experiment. With concurrent control of NT and FR, FGFs with density ranges as high as 0.86 g cm−3 were achieved within a single print. Various FGFs were designed using linear, concave, and convex density gradient functions. The density-process correlation model was then used to obtain the NT and FR parameters needed to produce the density values as demanded by the part design. FGFs along with their single density foam (SDF) counterparts were successfully printed with good dimensional stability. Under quasi-static compression testing, all FGFs showed higher energy absorption capacity at low stress levels, as compared to their SDF counterparts. Moreover, under impact conditions, a significant loading direction dependency was found for the FGFs. Overall, this work demonstrates the AM feasibility of FGFs as a single print with tailored density profiles which can be used in generative design optimization of AM parts for enhanced mechanical performance and other functionalities.