Noncentrosymmetric mixed-metal carbonate fluorides are promising materials for deep-ultraviolet (DUV) nonlinear optical (NLO) applications. We report on the synthesis, characterization, structure-property relationships, and electronic structure calculations on two new DUV NLO materials: KMgCOF and CsMg(CO)F. Both materials are noncentrosymmetric (NCS). KMgCOF crystallizes in the achiral and nonpolar NCS space group P6̅2m, whereas CsMg(CO)F is found in the polar space group Pmn2. The compounds have three-dimensional structures built up from corner-shared magnesium oxyfluoride and magnesium oxide octahedra. KMgCOF (CsMg(CO)F) exhibits second-order harmonic generation (SHG) at both 1064 and 532 nm incident radiation with efficiencies of 120 (20) × α-SiO and 0.33 (0.10) × β-BaBO, respectively. In addition, short absorption edges of <200 and 208 nm for KMgCOF and CsMg(CO)F, respectively, are observed. We compute the electron localization function and density of states of these two compounds using first-principles density functional theory, and show that the different NLO responses arise from differences in the denticity and alignment of the anionic carbonate units. Finally, an examination of the known SHG active AMCOF (A = alkali metal, M = alkaline earth metal, Zn, Cd, or Pb) materials indicates that, on average, smaller A cations and larger M cations result in increased SHG efficiencies.