Silks are widely used biomaterials, but there are still weaknesses in their mechanical properties. Here we report a method for improving the silk fiber mechanical properties by genetic disruption of the ionic environment for silk fiber formation. An anterior silk gland (ASG) specific promoter was identified and used for overexpressing ion-transporting protein in the ASG of silkworm. After isolation of the transgenic silkworms, we found that the metal ion content, conformation and mechanical properties of transgenic silk fibers changed accordingly. Notably, overexpressing endoplasmic reticulum Ca2+-ATPase in ASG decreased the calcium content of silks. As a consequence, silk fibers had more α-helix and β-sheet conformations, and their tenacity and extension increased significantly. These findings represent the in vivo demonstration of a correlation between metal ion content in the spinning duct and the mechanical properties of silk fibers, thus providing a novel method for modifying silk fiber properties.