We investigate the effect of O or Be co-doping on the exchange interaction between Cr spins in (Ga, Cr)N by means of first-principles calculations based on the density-functional theory. The ferromagnetic exchange interactions are reduced by doping Be around Cr. On the other hand, O doping reduces the ferromagnetic interaction remarkably only for the case of Cr-O-Cr complex formation. The enhancement of the ferromagnetic exchange interaction cannot be achieved by doping O or Be impurities. However, the O and Be impurities can help the clustering of Cr atoms due to the enhancement of the attractive interaction between Cr atoms.