Six new alkaline-earth metal carboxyphosphonates [Mg(H2O)(H2PMIDA)] (1), [Sr(H2O)(H2PMIDA)] (2), [Sr2(H2O)(PMIDA)] (3), [Sr2(HPO4)(H2PMIDA)] (4), [Ba2(HPO4)(H2PMIDA)] (5), and [Ba2(H2O)(H2PMIDA)2] (6) (H4PMIDA = N-(phosphonomethyl)iminodiacetic acid) have been synthesized solvothermally in order to study the coordination behavior of H4PMIDA towards alkaline-earth metal ions (Mg2+, Sr2+, and Ba2+) and the structural features of the resulting polymeric compounds. The newly synthesized compounds have been characterized by elemental analysis, UV-Vis spectrometry, IR spectroscopy, thermogravimetry analysis, solid state 31P MAS NMR, powder X-ray diffraction analysis and single crystal X-ray diffraction techniques. The single crystal structure analysis revealed structural variability of the prepared compounds. Compounds 1, 2, 4 and 5 are three-dimensional with the H2PMIDA skeletons connecting the inorganic parts to each other, whereas compound 3 has a layered structure. Compounds 2, 4 and 5 contain helical structural motifs. In addition, the extrinsic luminescent properties of Eu(III)- and Tb(III)-doped compounds 1, 4 and 5 have also been studied.