Thanks to the high payload capacity and high mobility, quadruped robots have been intensively researched to perform various tasks such as explorations, industrial mappings, and rescues. However, little attention has been paid to finding traversable regions and performing the tasks simultaneously. In this paper, to perform target tracking safely, we propose a novel system that strictly plans the traversable, obstacle-free trajectory while estimating the robot state with the state-of-the-art SLAM (simultaneously localization and mapping) and the target position with the neural network-based object detection. Furthermore, a hierarchical tracking controller with MPC (model predictive control) is designed. The performance of the proposed system is validated by simulations in a harsh environment.