This paper considers the problem of optimal investment-reinsurance for the insurer and reinsurer under the constant elasticity of variance (CEV) model. It is assumed that the net claims process is approximated by a diffusion process, both the insurer and reinsurer can invest in risk-free assets and risky assets. We use the variance premium principle to calculate the premiums of the insurer and reinsurer, and the reinsurance proportion is constrained by the net profit condition. Our objective is to maximize the joint exponential utility of the insurer and reinsurer's terminal wealth for a fixed time. By solving the HJB equation, we obtain the explicit expressions of the optimal investment-reinsurance strategy and value function. We find that the optimal reinsurance strategy can be divided into many cases and is related to the risk aversion coefficient of the insurer and reinsurer, but independent of the price of risky assets. Furthermore, we give the proof of the verification theorem. Finally, we demonstrate a numerical analysis to explain the results.