Amorphous carbon films (a-C) codoped by two metal elements exhibit the desirable combination of tribological and mechanical properties for widely potential applications, but are also prone to catastrophic failure due to the inevitable residual compressive stress. Thus far, the residual stress reduction mechanism remains unclear due to the insufficient understanding of the structure from the atomic and electronic scale. In this paper, using ab initio calculations, we first designed a novel Cu/Cr codoped a-C film and demonstrated that compared with pure and Cu/Cr monodoped cases, the residual stress in Cu/Cr codoped a-C films could be reduced by 93.6% remarkably. Atomic bond structure analysis revealed that the addition of Cu and Cr impurities in amorphous carbon structure resulted in the critical and significant relaxation of distorted C-C bond lengths. On the other hand, electronic structure calculation indicated a weak bonding interaction between the Cr and C atoms, while the antibonding interaction was observed for the Cu-C bonds, which would play a pivot site for the release of strain energy. Those interactions combined with the structural evolution could account for the drastic residual stress reduction caused by Cu/Cr codoping. Our results provide the theoretical guidance and desirable strategy to design and fabricate a new nanocomposite a-C films with combined properties for renewed applications.