By means of first-principles calculations, we have investigated the band structrue, density of states (DOS) and electron density difference of the compound YFe2B2. For the exchange correction energy, we employ GGA in the form of PBE. The interactions between valence electrons and ionic core are represented by the ultrasoft pseudo potential.The results show that the compound YFe2B2 is paramagnetic. The 5s and 5p states of Y atoms are in a strong local state. The Fe and B atoms form nearest-neighbor bonds associated with Fe—B bonding. The Fe 3d-like bands with low E(k) dispersion participate in metallic-like Fe-Fe bonds. The Fe 3d states have an admixture of anti-bonding Y 4d states. In a word, YFe2B2 in the ground state is a paramagnetic ternary alloy.