Hexapod robots have stronger adaptability to dynamic unknown environments than wheeled or trucked ones due to their flexibility. In this paper, a novel control strategy based on rolling gait and trajectory planning, which enables hexapod robots to walk through dynamic environments, is proposed. The core point of this control strategy is to constantly change gait and trajectory according to different environments and tasks as well as stability state of robot. We established a gait library where different kinds of gaits are included. Zero moment point, which indicates the stability of robot, is estimated by a Kalman filter. According to this control strategy, a hierarchical control architecture consisting of a man-machine interface, a vision system, a gait and trajectory planner, a joint motion calculator, a joint servo controller, a compliance controller and a stability observer is presented. The control architecture is applied on a hexapod robot engaging in disaster rescue. Simulation and experimental results show the effectiveness of our control strategy.