In order to fully utilize the advantages of expandable graphite (large specific surface area and porous structure), a solvent-free method was used to provide a supporting skeleton for expandable graphite through melting, bonding and solidification of polyvinylidene fluoride (PVDF). Based on its porous structure and enhanced mechanical stability, the formed PVDF/expandable graphite composite foam, amounts of functional groups were introduced throughout the foam (outside on the surface and inner side in the expandable graphite) by deposition of tannic acid (TA) and dopamine (DA), endowing it selective adsorption characteristics. The functioned foam exhibited excellent dynamic dye adsorption capacity by capturing dye molecules firmly through π-π interaction, hydrogen bonding, and charge attraction between the functional groups and dyes. Furthermore, with low zeta potential (-24.9 mV), the functional groups showed selective adsorption properties resulting in rapid separation of cationic dyes and anionic dyes. The functionalized PVDF/expandable graphite composite foam contact these two materials together in order to complement each other's advantages, showing a new research orientation for the treatment of different types of dyestuff wastewater.