Cavities are created by hydrophobic interactions between residue side chain atoms during the folding of enzymes. Redesigning cavities can improve the thermostability and catalytic activity of the enzyme; however, the synergistic effect of cavities remains unclear. In this study, Rhizomucor miehei lipase (RML) was used as a model to explore volume fluctuation and spatial distribution changes of the internal cavities, which could reveal the roles of internal cavities in the thermostability and catalytic activity. We present an inside out cavity engineering (CE) strategy based on computational techniques to explore how changes in the volumes and spatial distribution of cavities affect the thermostability and catalytic activity of the enzyme. We obtained 12 single-point mutants, among which the melting temperatures (Tm) of 8 mutants showed an increase of more than 2°C. Sixteen multipoint mutations were further designed by spatial distribution rearrangement of internal cavities. The Tm of the most stable triple variant, with mutations including T21V (a change of T to V at position 21), S27A, and T198L (T21V/S27A/T198L), was elevated by 11.0°C, together with a 28.7-fold increase in the half-life at 65°C and a specific activity increase of 9.9-fold (up to 5,828 U mg-1), one of the highest lipase activities reported. The possible mechanism of decreased volumes and spatial rearrangement of the internal cavities improved the stability of the enzyme, optimizing the outer substrate tunnel to improve the catalytic efficiency. Overall, the inside out computational redesign of cavities method could help to deeply understand the effect of cavities on enzymatic stability and activity, which would be beneficial for protein engineering efforts to optimize natural enzymes. IMPORTANCE In the present study, R. miehei lipase, which is widely used in various industries, provides an opportunity to explore the effects of internal cavities on the thermostability and catalytic activity of enzymes. Here, we execute high hydrostatic pressure molecular dynamics (HP-MD) simulations to screen the critical internal cavity and reshape the internal cavities through site-directed mutation. We show that as the global internal cavity volume decreases, cavity rearrangement can improve the stability of the protein while optimizing the substrate channel to improve the catalytic efficiency. Our results provide significant insights into understanding the mechanism of action of the internal cavity. Our strategy is expected to be applied to other enzymes to promote increases in thermostability and catalytic activity.