In this paper, using the first-principles calculations, we systemically study the magnetic and the negative thermal expansion (NTE) properties of Mn3(A0.5B0.5)N (A = Cu, Zn, Ag, or Cd; B = Si, Ge, or Sn). From the calculated results, except Mn3(Cu0.5Si0.5)N, all the doped compounds considered would exhibit the NTE. For the dopants at B sites, the working temperature of the NTE shifts to higher temperature range from Si to Sn, and among the compounds with these dopants, Mn3(A0.5Ge0.5)N has the largest amplitude of the NTE coefficient. As to the dopants at A sites, compared to Mn3(Cu0.5B0.5)N, Mn3(A0.5B0.5)N (A = Ag or Cd) exhibit the NTE with higher temperature ranges and lower coefficient of the thermal expansion. In a word, these compounds would have different working temperatures and coefficients of the NTE, which is important for the applications in different conditions.