This paper studies an optimal reinsurance and investment problem for a loss-averse insurer. The insurer's goal is to choose the optimal strategy to maximize the expected S-shaped utility from the terminal wealth. The surplus process of the insurer is assumed to follow a classical Cramér-Lundberg (C-L) model and the insurer is allowed to purchase excess-of-loss reinsurance. Moreover, the insurer can invest in a risk-free asset and a risky asset. The dynamic problem is transformed into an equivalent static optimization problem via martingale approach and then we derive the optimal strategy in closedform. Finally, we present some numerical simulation to illustrate the effects of market parameters on the optimal terminal wealth and the optimal strategy, and explain some economic phenomena from these results.