Target tracking is an important sensing application of wireless sensor networks. In these networks, energy, computing power, and communication bandwidth are scarce. We have considered a random heterogeneous wireless sensor network, which has several powerful nodes for data aggregation/relay and large number of energy-constrained sensor nodes that are deployed randomly to cover a given target area. In this paper, a cooperative approach to detect and monitor the path of a moving object using a minimum subset of nodes while maintaining coverage and network connectivity is proposed. It is tested extensively in a simulation environment and compared with other existing methods. The results of our experiments clearly indicate the benefits of our new approach in terms of energy consumption.