Mobile sensor networks (MSNs) are good candidates for large-scale unattended surveillance applications. However, it is challenging to track moving targets due to their complex dynamic behaviors. Semiflocking algorithms have been proven to be efficient in controlling MSNs in both area coverage and target tracking applications. While many existing literatures on the study of semiflocking algorithms often assume an area of interest (AoI) to be regular and with unified traversal cost, the uneven and rough landscapes in real-life applications have imposed extra challenges and raised demands for new management strategies. In this article, a mobility map is used to incorporate different costs associated with irregular terrains which results in different maximum allowed speeds on nodes in different regions. In order to reduce target detection time and node energy consumption, a heuristic search algorithm is developed to find time-efficient and feasible paths between nodes and sensing targets. Under the proposed algorithm, nodes can effectively select a target to track or search for new targets in the AoI. Results of extensive experiments show that semiflocking-controlled nodes together with path planning can reach their targets faster with lower energy consumption compared to three exiting flocking-based algorithms.