Utilizing 3D-printing techniques to fabricate novel composites with multifunctional properties is a real challenge. This study deals with the synthesis of graphitic carbon nitride (g-C3N4) using melamine and reinforcing it with Poly (lactic acid) (PLA) to achieve enhanced mechanical and thermal properties. g-C3N4 is a silane surface modified to increase the bonding strength between filler and matrix. PLA/ g-C3N4 composite filament is extruded using a controlled speed of 30 rpm and a temperature of 170 degrees C, and samples are 3D-printed. To improve mechanical and thermal properties, varying weight percentages (0, 0.5, 1, 3, 5) of g-C3N4 are reinforced into the PLA matrix. The PLA composite (3% filler) exhibited a tensile strength of 62 MPa. The flexural and impact strengths of the composite containing 3% g-C3N4 were 63 MPa and 6.5 KJ/m(2), respectively. Mechanical properties of 3D printed PLA/g-C3N4 composites were enhanced due to dispersed g-C3N4 filler particles, which shared the stress produced in the polymer and the g-C3N4 entrapped the polymer matrix molecular chain. Compared to PLA composite (5% filler) and pure PLA, the initial and final degradation temperatures were increased by about 4.15% and 4.38%, respectively. The thermal properties improved owing to the g-C3N4 particles acting as a thermal barrier in the PLA matrix. Additionally, silane-treated g-C3N4 particles meet the PLA matrix, and the organo-functional group of the silane interacts with the PLA matrix, thus enhancing the interfacial bonding, which restricts the motion of polymer chains at elevated temperatures. The 3D printing process could make them more competitive in the market by making commercial PLA parts that are better for the environment and have better mechanical and thermal properties.