This paper studies insurance companies’ optimal reinsurance–investment strategy under the stochastic interest rate and stochastic volatility model, taking the HARA utility function as the optimal criterion. It uses arithmetic Brownian motion as a diffusion approximation of the insurer’s surplus process and the variance premium principle to calculate premiums. In this paper, we assume that insurance companies can invest in risk-free assets, risky assets, and zero-coupon bonds, where the Cox–Ingersoll–Ross model describes the dynamic change in stochastic interest rates and the Heston model describes the price process of risky assets. The analytic solution of the optimal reinsurance–investment strategy is deduced by employing related methods from the stochastic optimal control theory, the stochastic analysis theory, and the dynamic programming principle. Finally, the influence of model parameters on the optimal reinsurance–investment strategy is illustrated using numerical examples.