Zn-based and Mg-based alloys have been considered highly promising biodegradable materials for cardiovascular stent applications due to their excellent biocompatibility and moderate in vitro degradation rates. However, their strength is too poor for use in cardiovascular stents. The strength of these metals can be related to the sizes of the dislocation cores and the threshold stresses needed to activate slip, i.e., the Peierls stress. Using density functional theory (DFT) and an ab initio-informed semi-discrete Peierls–Nabarro model, we investigate the coupled effect of the solute element and mechanical straining on the stacking fault energy, basal dislocation core structures and Peierls stresses in both Zn-based and Mg-based alloys. We consider several biocompatible solute elements, Li, Al, Mn, Fe, Cu, Mg and Zn, in the same atomic concentrations. The combined analysis here suggests some elements, like Fe, can potentially enhance strength in both Zn-based and Mg-based alloys, while other elements, like Li, can lead to opposing effects in Zn and Mg. We show that the effect of solute strengthening and longitudinal straining on SFEs is much stronger for the Zn-based alloys than for the Mg-based alloys. DFT investigations on electronic structure and bond lengths reveal a coupled chemical-mechanical effect of solute and strain on electronic polarization, charge transfer, and bonding strength, which can explain the weak mechanical effect on Zn-based alloys and the variable strengthening effect among these solutes. These findings can provide critical information needed in solute selection in Zn-based and Mg-based alloy design for biomedical applications.