Mesoporous magnesium carbonate has been widely used in controlled release of drugs, adsorption or catalysis. In traditional methods, expensive alkoxide or MgO are usually employed as Mg-source to prepare mesoporous magnesium carbonate. Herein, based on the crosslinking property of ionic oligomers, a novel crosslinking ionic oligomer sol-gel method was proposed to prepare high-surface-area mesoporous magnesium carbonate using cheap MgCl2·6H2O and CO2 as material. (MgCO3)n crosslinking oligomer sols was produced based on the H-bond capping effects of ethanol and triethylamine. The evolution mechanism of crosslinking (MgCO3)n oligomer sols to gels was studied by using ATR-FTIR and NMR. The results indicated that with the slow volatilization of ethanol and triethylamine, a part of H-bond disappeared, which initiating the chain growth of (MgCO3)n oligomer molecules, and finally forming a crosslinking network. Combined with a CO2 critical point drying process, amorphous mesoporous magnesium carbonate nanoparticle with high surface area was obtained and characterized using ATR-FTIR, XRD, XPS, nitrogen adsorption/desorption analysis, SEM, TEM and EDS systematically. The specific surface area of magnesium carbonate reached 628 m2 g−1 when the n(TEA)/n(Mg2+) was 40:1. Moreover, the general applicability of this method was verified. Mesoporous sulfate and phosphate were synthesized, which indicating the crosslinking oligomer sol-gel chemistry provided a general strategy for the construction of mesoporous inorganic oxysalt materials. Our work has important guiding significance for the preparation of other mesoporous materials that using cheap inorganic salt as raw material.