In this paper we show the results of systematic investigations for the electronic-structure modifications of an armchair (10,10) single-walled carbon nanotube (SWNT) and graphene adsorbed on metal surfaces. The first-principles calculations based on the density-functional theory (DFT) were used to investigate transfer doping of these nanomaterials adsorbed on the fcc (111) surfaces of Al, noble metals (Ag, Cu, and Au), and transition metals (Rh, Pd, Ir, and Pt). We confirmed that the SWNT weakly interacts with the surfaces of Al and the noble metals (physisorption), while it strongly bonds to the transition-metal surfaces (chemisorption). The graphene adsorption on these metal surfaces is reinvestigated and found to be similar except for the Ir and Pt substrates, for which the interaction is weak as in the case of Al and the noble metal substrates. A phenomenological model is also developed on the basis of the rigid-band picture appropriate to physisorption. This model provides a relation between the Fermi-level shift and work-function difference and can conveniently be used in interpreting the DFT results for the transfer doping of both a SWNT and graphene on metal surfaces. We also identify the effect of hybridization between the graphene π orbitals and metallic valence states on the Fermi-level shift and find that the hybridization induces an extra downward shift of the linear-dispersion bands near the Dirac point relative to the other bands.