Existing optical phased array (OPA) dynamic imaging techniques can only be used to perform image reconstruction of targets undergoing simple motion. This article proposes an imaging technique for targets undergoing complex motion based on recent research in the OPA-LiDAR field. To this end, the proposed technique combines two sub-algorithms: an OPA scanning algorithm and a compressed-sensing ghost imaging (CS-GI) technique. The reliability of the proposed technique is verified based on theoretical analysis, numerical calculations, and experimental validation. The first sub-algorithm is an innovative adaptive, single-target, motion state extraction algorithm, utilizing the inertia-free scanning characteristics of OPA. From this, the trajectory of the target can be reshaped accurately, and the target motion state can be calculated with an error of less than 3%. The second sub-algorithm is a CS-GI algorithm that requires a small number of samples to achieve a high-resolution OPA-based GI. The sampling ratio employed in the CS-GI algorithm corresponds to the root mean square error (RMSE) convergence of the reconstructed image is 1. The proposed technique for moving target imaging can be effectively used to perform motion trajectory reshaping and image reconstruction of targets undergoing fast and complex motion. We believe that this technique can be effectively used in the fields of vehicle-mounted LiDAR, unmanned systems, and medical imaging.