The in-situ conversion process (ICP) involves complicated thermal-reactive-compositional flow processes where the production parameters are closely interdependent. Therefore, manual optimization of the production parameters of ICP through numerical simulation is arduous and time-consuming. This paper introduces a computational framework that integrates deep learning techniques and particle swarm optimization (PSO) to automatically optimize the values of production parameters of ICP, and thus locating the highest energy efficiency and the optimum energy usage. This approach utilizes a 3D CNN model to predict key metrics. The prediction process considers the detailed 3D heterogeneity of oil shale, resulting in remarkably high prediction accuracy, as evidenced by determination coefficients (R2) above 0.99. Subsequently, the trained CNN model is integrated to the PSO algorithm to automatically fine-tune the production parameters to optimize the energy efficiency of ICP.The optimization results yield three significant findings. First, as the energy consumption limit increases, the optimal number of heaters, well spacing, and heating temperature exhibit an upward trend, but stabilized beyond the threshold of 7 × 105 kWh. Secondly, the optimal input energy (7 × 105 kWh) is found for the given ICP model. Lastly, the analysis reveals that variations in initial reservoir pressure or bottomhole pressure have limited impact on cumulative oil production and energy usage.