Abstract This paper presents an integrated and practical control strategy to solve the leader–follower quadcopter formation flight control problem. To be specific, this control strategy is designed for the follower quadcopter to keep the specified formation shape and avoid the obstacles during flight. The proposed control scheme uses a hierarchical approach consisting of model predictive controller (MPC) in the upper layer with a robust feedback linearization controller in the bottom layer. The MPC controller generates the optimized collision-free state reference trajectory which satisfies all relevant constraints and robust to the input disturbances, while the robust feedback linearization controller tracks the optimal state reference and suppresses any tracking errors during the MPC update interval. In the top-layer MPC, two modifications, i.e. the control input hold and variable prediction horizon, are made and combined to allow for the practical online formation flight implementation. Furthermore, the existing MPC obstacle avoidance scheme has been extended to account for small non-apriorily known obstacles. The whole system is proved to be stable, computationally feasible and able to reach the desired formation configuration in finite time. Formation flight experiments are set up in Vicon motion-capture environment and the flight results demonstrate the effectiveness of the proposed formation flight architecture.