The effect of heating and freezing pretreatments on rapeseed oil yield and the volume of oil energy under uniaxial compression loading was investigated. Four separate experiments were carried out to achieve the study objective. The first and second experiments were performed to determine the compression parameters (deformation, mass of oil, oil yield, oil expression efficiency, energy, volume of oil and volume of oil energy). The third and fourth experiments identified the optimal factors (heating temperatures: 40, 60 and 80 °C, freezing temperatures: −2, −22 and −36 °C, heating times: 15, 30 and 45 min and speeds: 5, 10 and 15 mm/min) using the Box–Behnken design via the response surface methodology where the oil yield and volume of oil energy were the main responses. The optimal operating factors for obtaining a volume of oil energy of 0.0443 kJ/mL were a heating temperature of 40 °C, heating time of 45 min and speed of 15 mm/min. The volume of oil energy of 0.169 kJ/mL was reached at the optimal conditions of a freezing temperature of −36 °C, freezing time of 37.5 min and speed of 15 mm/min. The regression model established was adequate for predicting the volume of oil energy only under heating conditions.