Abstract：First-principles calculations are used to study the segregation of metallic and nonmetallic elements as well as their interactions on the grain boundary (GB) of nickel. Two typical GBs are constructed: close-packed Σ3(1 1 1)[-1 1 0] GB and quite open Σ5(2 1 0)(0 0 1) GB. According to the calculated energetic data, both the common transition alloying elements and nonmetallic elements C, H, O, N, B show strong segregation behavior on the Σ5 GB, while for the Σ3 GB, the segregation is not so significant. The interaction energies between the metallic elements with significant GB-segregation tendencies and nonmetallic elements when they occupy the most energy-favorable positions are investigated. It is found that Ru, Te, W and Ta exhibit strong repulsion to oxygen, indicating beneficial effects for the oxidation resistance behavior; Ta shows strong repulsive interaction to hydrogen, which should be helpful for the inhibition of the hydrogen-embrittlement. The present work should be useful for the grain boundary engineering of the Ni-based superalloy.