[C5H14N2][(UO2)(2)(C2O4)(3)(H2O)]center dot 3H(2)O center dot CO (NMPZ 1#) and [C5H14N2][UO2 (C2O4)(3/2)(H2O)][NO3]center dot H2O (NMPZ 2#) were synthesized by volatile method at room temperature using N-methylpiperazine as templates. The structures and optical properties were characterized by combination of single-crystal X-ray diffraction, PXRD, TG-DSC, IR, UV-Vis and fluorescence techniques. The single crystal structure results show that NMPZ 1# is a monoclinic crystal system, P2(1)/n space group while NMPZ 2# is a triclinic crystal system, P-1 space group. Interestingly, NMPZ 1# has the following special properties and applications. According to the results of fluorescence experiment, NMPZ 1# shows fluorescence attenuation with time increasing, which make it have a potential application as a fluorescent sensor material. CO gas could escape from the lattice of NMPZ 1# under UV-light, which demonstrates the potential application of NMPZ 1# as a CO gas reservoir. Overall, this study confirms the close relationship between the properties of uranyl oxalate complexes and amine templates; such structures could provide a reference for relevant research.