With the rapid developments of the all-solid-state deep-ultraviolet (deep-UV) lasers, the good nonlinear optical (NLO) crystal applied in this spectral region is currently lacking. Here, we design two novel NLO carbonates KBeCO3F and RbAlCO3F2 from the first-principles theory implemented in the molecular engineering expert system especially for NLO crystals. Both structurally stable crystals possess very large energy band gaps and optical anisotropy, so they would become the very promising deep-UV NLO crystals alternative to KBBF. Recent experimental results on MNCO3F (M = K, Rb, Cs; N = Ca, Sr, Ba) not only confirm our calculations, but also suggest that the synthesis of the KBeCO3F and RbAlCO3F2 crystals is feasible.