In this paper, the distributed formation control problem for multiple nonholonomic mobile robots using consensus-based approach is considered. A transformation is given to convert the formation control problem for multiple nonholonomic mobile robots into a state consensus problem. Distributed control laws are developed for achieving the formation control objectives: a group of nonholonomic mobile robots at least exponentially converge to a desired geometric pattern with its centroid moving along the specified reference trajectory. Rigorous proofs are provided by using graph, matrix , and Lyapunov theories. Simulations are also given to verify the effectiveness of the theoretical results.