Aiming at the problem of optical axis pointing deviation caused by the internal deformation errors of the satellite's solar observation system, an on-orbit identification and compensation method for the deformation errors is proposed. Firstly, the mathematical modeling for the light path transfer process of the solar observation system is established. Secondly, the on-orbit identification and compensation method for the deformation error parameters in the mathematical model are given. Finally, the identification and compensation methods are simulated by mathematical simulation. The compensation effect is evaluated with the optical axis pointing accuracy as the evaluation standard. The simulation results show that the pointing accuracy of the solar observation payload's optical axis is improved by two orders of magnitude before and after the on-orbit compensation for the deformation error, which verifies the effectiveness of the proposed method. The results can be used as a reference for other payloads with two-dimensional adjustment mechanism.