Glass materials are potential candidates as solid electrolytes for batteries, but the atomistic origins of the variations in their properties and functionalities with composition are not well understood. Here, based on combined experimental and simulation techniques, we investigate the structural origin of the variation in fracture toughness and ionic conductivity of lithium borophosphate glass electrolytes with varying compositions. We focus on these properties since they are critically important for mechanical stability and electrochemical performances of glassy electrolytes. To this end, we have performed molecular dynamics simulations combined with X-ray total scattering experiments to provide the atomic picture of the disordered structure of borophosphate glass. The mechanical properties have been characterized through single-edge precracked beam measurements and axial tensile simulations. We find that the deformation and fracture behaviors of the electrolytes are governed by bond switching events of boron, which dissipate the strain energy during fracture. The migration of lithium ions in the electrolyte network is facilitated by hopping between superstructural rings, which reflects the important role of medium-range order structure in determining the lithium-ion diffusion. These findings have important implications for the design of future glassy electrolytes.