The adsorption of cyanide on the top site of a series of transition metal M(100) (M = Cu, Ag, Au, Ni, Pd, Pt) surfaces via carbon and nitrogen atoms respectively, with the CN axis perpendicular to the surface, has been studied by means of density functional theory and cluster model. Geometry, adsorption energy and vibrational frequencies have been determined, and the present calculations show that the adsorption of CN through C-end on metal surface is more favorable than that via N-end for the same surface. The vibrational frequencies of CN for C-down configuration on surface are blue-shifted with respect to the free CN, which is contrary to the change of vibrational frequencies when CN is adsorbed by N-down structure. Furthermore, the charge transfer from surface to CN causes the increase of surface work function.