Water pollution, especially industrial or nuclear wastewater, has become a global environmental problem and poses a serious threat to human life and health. Efficient treatment of wastewater is still a huge challenge. Herein, we report two new metal-organic frameworks (MOFs), [Me2NH2][Sr-4(tatab)(3)(DMF)(0.4)(H2O)(1.6)]<middle dot>guest (1) and [Me2NH2](5)[La-3(mu-O)(tatat)(2)]<middle dot>guest (2) (H(3)tatab = 4,4 ',4 ''-((1,3,5-triazine-2,4,6-triyl)tris(azanediyl))tribenzoic acid, DMF = N,N-dimethylformamide, and H(6)tatat = 5,5 ',5 ''-(1,3,5-triazine-2,4,6-triyl)tris-(azanediyl)triisophthalic acid), with triazine and amine functional groups. Both of them contain anionic host frameworks and Me2NH2+ as counter cations in the pores. By virtue of the strong host-guest interactions between the triazine/imine functional groups on the framework and I-2, both 1 and 2 are able to effectively remove iodine from the solution. Also, interestingly, 1 and 2 exhibit different luminescence properties, and the prominent 2 possesses sensitive fluorescence quenching behavior toward Cu2+ or Fe3+ ions, which can be used to effectively detect these ions in water.