In this paper, we study the problem of maintaining a stable mobile robot formation, steering and localizing all robots in an unknown dynamic environment consisting of multiple periodically moving objects, without the presence of a global positioning system or a robot tracking system. We propose a distributed observer such that each agent can estimate global positions of all mobile robots and that of moving landmarks in an unknown environment. By combining the proposed distributed observer with the distributed formation control and centroid tracking control law, we show that the formation shape can be maintained by utilizing its available relative measurements and the estimated relative measurements to its neighbors, and the group's centroid follows a desired trajectory. We present stability analysis of the closed‐loop system. Finally, we validate the proposed methods in a simulation result where a group of mobile robots can maintain a robust formation and maneuver in an unknown dynamic environment.