The derivation, implementation, and performance assessment of a differential drag based algorithm, designed for spacecraft formation control using a relative orbital elements formulation, is presented. In contrast to similar approaches found in literature, the underlying motion dynamics model used to derive the control law includes J 2 perturbation as well as atmospheric drag perturbation based on a nonlinear density model. The basic idea of the control algorithm is to algebraically transform the nonlinear plant into a linear substitute. The resulting control law can be interpreted as combined feedforward and feedback PID control, applied to the linear substitute model. Motion dynamics and perturbations are accounted for in a feedforward branch while a PID feedback branch undertakes the cancellation of errors caused by model uncertainties and unmodeled physics. For linearized plant models, the computation of a feedforward branch is straight forward from the state transition matrix. In the nonlinear case proposed in this paper, the inclusion of a feedforward signal is achieved using the input-output linearization technique, yielding a nonlinear and globally valid control law. Sample numerical simulations are presented to support the validity of the controller and to demonstrate its performance compared to a simple PID controller. Simulation results show enhanced tracking performance of the mean along-track separation reference signal and reduced control effort. Moreover, input–output linearization enables the control of a large set of operating points using one set of control parameters.