Abstract Magnetic semiconductors have been demonstrated to work at low temperatures, but not yet at room temperature for spin electronic applications. In contrast to the p-type diluted magnetic semiconductors, n-type diluted magnetic semiconductors are few. Using a combined method of the density function theory and quantum Monte Carlo simulation, we briefly discuss the recent progress to obtain diluted magnetic semiconductors with both p- and n-type carriers by choosing host semiconductors with a narrow band gap. In addition, the recent progress on two-dimensional intrinsic magnetic semiconductors with possible room temperature ferromangetism and quantum anomalous Hall effect are also discussed.