We present three Mg-formate frameworks, incorporating three different ammoniums: [NH4][Mg(HCOO)3] (1), [CH3CH2NH3][Mg(HCOO)3] (2) and [NH3(CH2)4NH3][Mg2(HCOO)6] (3). They display structural phase transitions accompanied by prominent dielectric anomalies and anisotropic and negative thermal expansion. The temperature-dependent structures, covering the whole temperature region in which the phase transitions occur, reveal detailed structural changes, and structure-property relationships are established. Compound 1 is a chiral Mg-formate framework with the NH4(+) cations located in the channels. Above 255 K, the NH4(+) cation vibrates quickly between two positions of shallow energy minima. Below 255 K, the cations undergo two steps of freezing of their vibrations, caused by the different inner profiles of the channels, producing non-compensated antipolarization. These lead to significant negative thermal expansion and a relaxor-like dielectric response. In perovskite 2, the orthorhombic phase below 374 K possesses ordered CH3CH2NH3(+) cations in the cubic cavities of the Mg-formate framework. Above 374 K, the structure becomes trigonal, with trigonally disordered cations, and above 426 K, another phase transition occurs and the cation changes to a two-fold disordered state. The two transitions are accompanied by prominent dielectric anomalies and negative and positive thermal expansion, contributing to the large regulation of the framework coupled the order-disorder transition of CH3CH2NH3(+). For niccolite 3, the gradually enhanced flipping movement of the middle ethylene of [NH3(CH2)4NH3](2+) in the elongated framework cavity finally leads to the phase transition with a critical temperature of 412 K, and the trigonally disordered cations and relevant framework change, providing the basis for the very strong dielectric dispersion, high dielectric constant (comparable to inorganic oxides), and large negative thermal expansion. The spontaneous polarizations for the low-temperature polar phases are 1.15, 3.43 and 1.51 μC cm(-2) for 1, 2 and 3, respectively, as estimated by the shifts of the cations related to the anionic frameworks. Thermal and variable-temperature powder X-ray diffraction studies confirm the phase transitions, and the materials are all found to be thermally stable up to 470 K.