The current paper presents optimal reconfiguration trajectories and formation-keepings in satellite formation flying. The state-dependent Riccati equation technique is utilized as a nonlinear controller for both the reconfiguration problem and formation-keeping problem. A state-dependent coefficient form is formulated for the relative nonlinear dynamics. The Taylor series and a transformation matrix are used to establish the state-dependent coefficient form from the nonlinear equation of relative motion with J 2. Optimal reconfiguration trajectories that minimize energy in satellite formation flying are obtained. The formation-keeping controller provides robustness under severe orbital perturbations.