The microdefects and electronic structure have been studied by measuring the positron lifetime spectra of mono- and polycrystalline Ni3Al alloys with B content ranging from 0.00 to 2.22at%,The experimental results show that the opening space of the defect on grain boundary is larger than that of a monovacancy in polycry-stalline Ni3Al alloy. More valence electrons participate in Ni-Ni and Ni-Al bondings in bulk corresponding to stronger cohesion, while less valence electrons parti-cipate in those on grain boundaries corresponding to weaker cohesion. When B atoms segregate to defects, they form strong covalent bondings with Ni and A1 atoms and strengthen the bonding cohesion in those locations. The interaction of B atoms which occupy interstitial sites,with Ni and Al atoms in bulk leads to the increase of the density of valence electrons, thus increases the bonding cohesion in the bulk.