This study presents the development of flexible piezoelectric nanogenerators (PENGs) utilizing graphitic carbon nitride (g-C3N4) nanoflakes (CNNFs) and polyvinylidene fluoride (PVDF) composites fabricated via the direct ink writing (DIW) 3D printing method. A novel approach of synthesizing CNNFs using the ethanol exfoliation method was demonstrated, which significantly reduces preparation time and cost compared to traditional acid exfoliation. The CNNFs are incorporated into PVDFs at varying weight percentages (5, 7.5, 10, and 15 wt.%) to optimize the β-phase content and piezoelectric properties. Characterization techniques including XRD, FTIR, and FESEM confirm the successful synthesis and alignment of nanoflakes inside the PVDF matrix. The film with 7.5% CNNF achieves the highest performance, exhibiting a peak output voltage of approximately 6.5 V under a 45 N force. This study also explores the effects of UV light exposure. Under a UV light, the film exhibits an output voltage of 8 V, indicating the device's durability and potential for practical applications. The fabricated device showed significant voltage outputs during various human motions, confirming its suitability for wearable self-powered IoT applications. This work highlights the efficacy of the ethanol exfoliation method and the DIW printing technique in enhancing the performance of flexible PENGs.