Data aggregation is a fundamental and efficient algorithm to reduce the communication overhead and energy consumption in wireless sensor networks (WSNs). However, WSNs need both energy-efficient and privacy-preserving when being deployed in an unprotected area. In this paper, we propose an energy-efficient and privacy-preserving data aggregation algorithm CBDA (the chain-based data aggregation). In the CBDA, sensor nodes will be organized as a tree topology. The leaf nodes of the tree sequentially reconnect with each other to form many chain topologies. For assuring data privacy, after data gathering, (1) the tail nodes (the nodes which on the tail of chain) need to slice their sensing data into J fragments. One fragment is kept by themselves, and they distribute the J −1 data fragments to their neighbor nodes. (2) Each tail node will inject some fake fragments into its J −1 fragments to interfere with adversaries. The CBDA can achieve less energy consumption and higher aggregation accuracy during data aggregation. We perform a comprehensive simulation to make a comparison among the CBDA with existing algorithms. The experimental results demonstrate that the CBDA outperforms the existing algorithms. INDEX TERMS Wireless sensor network, data processing, data privacy; energy conservation, accuracy.