In the prevailing operations of agile satellites for time delay integration (TDI) imaging tasks, two DOFs in the attitude maneuver are determined by tracking the transient target point, while the third DOF is used in the control of the drift angle, which is calculated within the sensor focal plane as a feedback. However, optimal attitude maneuver planning is rarely considered during a TDI imaging mission to improve the efficiency of agile satellites. In this project, a general attitude maneuver planning for agile satellites in the TDI imaging of an arbitrary target strip is formulated, where the energy consumption is minimized while the TDI imaging quality is guaranteed. Coupled with the attitude dynamics, the highly nonlinear constraints required by the TDI imaging principal make this planning hard to solve. By introducing a parameterized time mapping technique and a compact approach to the attitude maneuver that ensures zero drift angle, the problem is relieved in both complexity and computational burden. The validity of this approach is verified by various imaging simulations.