In present study, we investigated the adsorption of some heavy metals atoms like silver, copper, nickel and zinc with graphene and graphdiyne using density functional theory (DFT) study. Three sites for graphene and nine sites for graphdiyne were considered to reach full structural optimization. Most stable configuration, adsorption energy and equilibrium geometric were determined. The graphene was more capable of nickel atom adsorption comparing to other mentioned atoms due to the stronger adsorption energy (−2.791482 eV) and shorter equilibrium distance between nickel atom and closest carbon atom of graphene while the binding energy between graphene and zinc atom was weak physisorption adsorption. Furthermore, interaction energy between graphene with silver and copper was typical physisorption adsorption. Moreover, our results showed that graphdiyne had great chemisorption interaction with nickel atom (−3.446027 eV) and typical chemisorption adsorption with silver and copper atom while interaction energy between graphdiyne and zinc atom was weak physisorption adsorption. Also from our results it is obvious that graphdiyne was a better adsorbent for silver, copper and nickel atom comparing to graphene. Moreover, by analyzing electronic structures, we confirmed the strong adsorbent energy between nickel atom with graphene and graphdiyne.