The ab initio pseudopotential method (VASP package) within the gradient approximation (GGA) for the exchange-correlation potential is used to study the effect of Li and Na substitution for Be atoms on the electronic and magnetic properties of wurtzite-like beryllium monoxide BeO with an impurity concentration of 0.028. When Li impurity is introduced into BeO, the system is found to remain nonmagnetic. At the same time, the BeO:Na system adopts magnetic moments (~0.8 fuB per cell) through the spin polarization of the 2p-state of oxygen atoms surrounding the impurity center. After lithium incorporation into BeO, the spectrum of BeO:Li becomes metal-like, while the introduction of sodium results in the magnetic semimetal type of the BeO:Na spectrum.