Series of Eu2+- and Ce3+-doped aluminium oxynitrides Al5O6N were prepared using the standard sol–gel technique with following firing in the flow of N2. Rare-earth metals oxides (Eu2O3 and CeO2) and complexes (Eu(acac)3 and Ce(acac)3) were used as sources of doping ions. It was found that both concentration of ions and nature of precursor affect phase composition and luminescent properties of Al5O6N:Eu2+ and Al5O6N:Ce3+ materials. At low concentrations of Eu2+ and Ce3+ the significant content of α-Al2O3 and AlN is observed and the content of impurities is higher for samples prepared from Eu/Ce(acac)3 comparing to samples prepared from oxides. The content of impurities decrease when the concentration of RE-ions increases to 0.1–0.2at%, at higher concentration the formation of RE-aluminates is observed. The intensity of luminescence increases when content of RE ions increases to 0.5at% for Al5O6N:Eu2+ and 0.1at% for Al5O6N:Ce3+, at higher concentrations a quenching of luminescence is observed.