This paper deals with routing algorithm of mobile robot, especially Legged Robot. A six-legged robot is set to run on a labyrinth and look for a fire to extinguish it. Robot start with identifying its initial position and then navigate to the fire position candidates. When the robot correctly identified its initial position then the routing can be done successfully. However, by only using mapping data, robot can be easily missed to detect its correct initial position, so the navigation and search of fire also become failed. Therefore, Monte Carlo localization is introduced as method to estimate robot position of robot continuously. Once position of the robot is estimated, dynamic programming will determine the fastest route to the target. This two step method is successfully navigating robots in tracing the labyrinth by providing an introduction to the robot's position against the maze and determining the fastest route to get to the target.