Close correlation among lattice, spin, and charge in the manganese-based antiperovskite material