Materials containing mixed anions, particularly, oxyhalides containing asymmetric functional building units, may lead to the discovery of excellent nonlinear optical (NLO) materials. In the present work, the geometric structure, mechanical properties, electronic structure and optical properties of two d 0–d 10 electron transition-metal oxyhalides Cs2CdV2O6Cl2 and Cs3CdV4O12Br have been systematically determined based on density functional theory. The asymmetric functional building units [V2O7], [V4O13], [CdO2Cl4] and [CdO4Br2] exhibit varying degrees of second-order Jahn−Teller distortions, contributing differently to the macroscopic nonlinearity. Mechanical properties reveal that the two oxyhalides are structurally and mechanically stable. Detailed electronic and optical properties of the two oxyhalides are provided. Optical anisotropy character is exhibited along different polarization vectors, giving a large birefringence for satisfying the phase-matching condition. Maximum absolute values of static second harmonic generation (SHG) coefficients are 4.47 pm V−1 for Cs2CdV2O6Cl2 and 3.72 pm V−1 for Cs3CdV4O12Br, suggesting that Cs2CdV2O6Cl2 and Cs3CdV4O12Br are potential NLO crystals with large SHG coefficients. In particular, unique 3D framework structures give a polar structure superposition of individual moments for asymmetric functional building units. Thus, maximum magnitudes of the total microscopic dipole are achieved, having the largest influence on the SHG response. This study elucidates the relationship between the structure and properties of transition-metal oxyhalides, providing valuable insights for designing NLO materials with excellent performance.