A nanocomposite comprising CA/CdS-graphene/3DE was effectively utilized as a photoelectrochemical (PEC) sensor-adsorbent for Cu2+. The rich functional groups in the nanocomposite have driven the binding of Cu2+ to the adsorbent active sites. Interestingly, CA/CdS-graphene/3DE was not only used for the adsorption of Cu2+ but also simultaneously detection Cu2+. It is worth mentioning that, CA is not harmful to people and to the environment, and it is completely destroyed in the soil in less than one year. This is the first time ever that CA/CdS-graphene/3DE was used in the PEC sensor as an active material to detect a trace amount of Cu2+. The fascinating interaction of CdS-graphene manifested remarkable adsorption, selectivity and sensitivity of Cu2+. Conclusively, we successfully constructed a smart device with the ability to manifest both sensing and adsorptive properties, and subsequently overcome the limitation of the existing water filtration technology which only can filter off the water-soluble heavy metals.