The charged metal−organic framework (MOF) (anionic and cationic MOF) material plays an important role in gas adsorption and separation and ecological environment management. Herein, we reported a partially charged Mg-based MOF (FJU-129) with dimethylamine counterions, which can efficiently separate C 2 H 2 from CO 2 and rapidly adsorb the cationic dye methylene blue (MB). FJU-129a showed a high uptake capacity of up to 133.8 cm 3 /g for C 2 H 2 at 273 K, 1 bar, and low isosteric heat of adsorption of C 2 H 2 (24.78 kJ/mol). The C 2 H 2 / CO 2 separation is validated by a dynamic breakthrough experiment at 296 K, 1.5 bar, and the Grand Canonical Monte Carlo simulation revealed that the partially remaining charge on the magnesium sites has an electrostatic force on the −C�C− bond of C 2 H 2 molecules, and C−H•••π interactions play an important role in the separation of C 2 H 2 /CO 2 selective mixtures. In addition, owing to the pore size and electrostatic effect, FJU-129 selectively absorbs MB and excludes other cationic dyes and anionic dyes (MB, CV, RB, R6G, MO, and SD-III).