From a deep eutectic mixture consisting of trimethylammonium chloride (TMACl) and oxalic acid, two templated zirconium phosphates, ZrPOF-TMA1 with 8- and 10-ring pore channels as well as ZrPOF-TMA2 with 7- and 8-ring pore channels, have been synthesized. A low P/Zr ratio is necessary for ZrPOF-TMA1, and higher P/Zr ratios tend to form ZrPOF-TMA2, but the former cannot be obtained by templating TMACl under hydrothermal conditions. This is the first example in which a trimethylammonium cation, a protonated tertiary amine, has been used as a template to successfully synthesize two microporous zirconium phosphate materials, showing the potential for novel chemistry in ionothermal reactions. Both materials have a relatively high thermal stability and are stable up to 410 °C. Of the two microporous materials, ZrPOF-TMA2 with small pore openings exhibits a highly effective pore-selective behaviour that can discriminate between CO(2) and CH(4), with a CO(2)/CH(4) adsorption ratio of 12.7 at 1 bar.