Strain, a simple and predictive parameter, has been utilized to control the materials property. In various materials, drastic changes in chemical and physical properties are observed with an introduction of strains by lattice distortion or lattice mismatch. In this work, we investigate the correlation between mechanical deformation and defects/dopants in materials using first-principles calculations. First, we examine how mechanical deformation impacts on defect formation that is critical for the materials property. Our calculations predict that strain and hydrostatic pressure lower the formation energy of oxygen vacancies in SrTiO3, thereby enhancing the vacancy formation, which agrees with the experimental observation of oxygen vacancies at the strain-imposed regions in SrTiO3 bicrystals. Second, how dopants introduce strain via lattice distortion is examined. We find that chemical doping such as hydrogenation induces strong strain in the VO2 lattice. It is experimentally observed that the massive hydrogenation leads to the electronic phase transition and dramatic out-of-plane lattice expansion. Our calculations explain that the phase transition is originated from the heavily doped electrons with cooperative interaction of hydrogenation-induced strain, i.e., lattice expansion.