The effect of glycerol and sorbitol on the stability of porcine pancreas trypsin was investigated in this work. Molecular dynamics simulation and thermostability results showed that trypsin has two flexible regions, and polyols (sorbitol and glycerol) stabilize the enzyme by decreasing the flexibility of these regions. Radial distribution function results exhibited that sorbitol and glycerol were excluded from the first water layer of the enzyme, therefore decrease the flexibility of the regions by preferential exclusion. Also, results showed that the stabilization effect of sorbitol is more than glycerol. This observation could be because of the larger decrease in the fluctuations of trypsin in the presence of sorbitol. We also examined the role of solvent's hydrophobicity in enzyme stabilization by sorbitol and glycerol. To do so, the thermostability of trypsin was evaluated in the presence of solvents with different hydrophobicity (methanol, ethanol, isopropanol and n-propanol) in addition to the polyols. Our results depicted that glycerol is a better stabilizer than sorbitol in the presence of hydrophobic solvents (n-propanol), whereas sorbitol is a better stabilizer than glycerol in the presence of hydrophilic solvents (methanol).