The Mn3XN(X=Zn, Cu, Sn) compounds and their solid solutions with anti-perovskite structure were prepared by solid state reaction. Their magnetic transition and simultaneous abnormal thermal expansion behaviors were studied by SQUID and variable temperature X-ray diffraction. The lattice contraction was found in Mn3Cu0.5Sn0.5N and Mn3Zn0.5Sn0.5N during the magnetic transition process, however not in pure Mn3XN(X=Zn, Cu, Sn). The mechanism is discussed, combined with the different doping effects. It seems that the lattice contraction behavior is sensitive to the number of valence electrons at the X site in Mn3XN series.