In order to prolong the network lifetime, energy-efficient protocols should be designed to adapt the characteristic of wireless sensor networks. Clustering Algorithm is a kind of key technique used to reduce energy consumption, which can increase network scalability and lifetime. This paper studies the performance of clustering algorithm in saving energy for heterogeneous wireless sensor networks. A new distributed energy-efficient clustering scheme for heterogeneous wireless sensor networks is proposed and evaluated. In the new clustering scheme, cluster-heads are elected by a probability based on the ratio between residual energy of node and the average energy of network. The high initial and residual energy nodes will have more chances to be the cluster-heads than the low energy nodes. Simulational results show that the clustering scheme provides longer lifetime and higher throughput than the current important clustering protocols in heterogeneous environments.