Herein, we fabricated a smart membrane by electrospinning TiO2@g-C3N4 doped polyvinylidene fluoride (PVDF) nanofibers. The as-formed beads-on-string structure and hierarchical roughness of the nanofibers contribute to its outstanding property to liquids, which is desirable in photocatalysis. The as-prepared composite was analyzed by XRD, DSC and FT-IR, SEM, TEM.