The spaceborne Inverse Synthetic Aperture Radar (ISAR) has received significant attention due to its extensive observation range and imaging performance. However, the complex motion between spaceborne platform and the air target will lead to a variation of slant distance and a nonstationary image projection plane, which will cause the one-dimension (1D) and the two-dimension (2D) spatial-variant phase errors, respectively. To address the phase errors problem, we construct a spaceborne ISAR imaging model of the air targets at first, which considers the target rotation and the variation of radar line of sight (RLOS), and the phase errors model is deduced furtherly. Next, a parametric optimization algorithm based on the minimum image entropy search using a gradient-based iterative solver is proposed. Meanwhile, in order to increase the robustness of the algorithm, we propose a data-based rough estimation method of the initial values of motion parameters. Finally, a well-focused ISAR image can be obtained by compensating the estimated phase errors parameters. The effectiveness and superiority of the proposed algorithm is validated by the simulation results compared with some existing algorithms under different SNR conditions.