Feces provides information about the donor and potentially attracts both conspecifics and predators and also parasites. The excretory system must be coordinated with other behaviors in insects. We found that crickets started walking forward following defecation. Most intact crickets walked around the experimental arena, stopped at a particular site and raised their bodies up with a slight backward drift to defecate. After the feces dropped to the floor, a cricket started walking with a non-coordinated gait pattern away from the defecation site, and then changed to a tripod gait. To demonstrate that walking is a reflex response to defecation we analyzed the behavior of headless crickets and found that they also showed walking following defecation. In more than half of defecation events, headless crickets walked backwards before defecation. The posture adopted during defecation was similar to that of intact crickets, and forward walking after defecation was also observed. The frequency of forward walking after defecation in headless crickets was greater than in intact crickets. The gait pattern during forward walking was not coordinated and never transitioned to a tripod gait in headless crickets. In animals whose abdominal nerve cords were cut, in any position, pre- or post-defecation walking was not shown in either intact or headless crickets, although they defecated. These results indicated that the terminal abdominal ganglion receives information regarding hind gut condition. It also indicated that ascending signals from the terminal abdominal ganglion initiated leg movement through the neuronal circuits within the thoracic ganglia, and that descending signals from the brain must regulate the leg motor circuit to express the appropriate walking gait.