Due to nonuniform node distribution, the energy consumption of nodes are imbalanced in clustering-based wireless sensor networks (WSNs). It might have more impact when nodes are deployed in a three-dimensional (3D) environment. In this regard, we propose the eccentricity based data routing (EDR) protocol in a 3D WSN with uniform node distribution. It includes network partitions called 3D subspaces/clusters of equal member nodes, an energy-efficient routing centroid (RC) nodes election and data routing algorithm. The RC nodes election conducts in a quasi-static nature until a certain period unlike the periodic cluster heads election of typical clustering-based routing. It not only reduces the energy consumption of nodes during the election phase, but also in intra-communication. At the same time, the routing algorithm selects a forwarding node in such a way that balances the energy consumption among RC nodes and reduces the number of hops towards the sink. The simulation results validate and ensure the performance supremacy of the EDR protocol compared to existing protocols in terms of various metrics such as steady state and network lifetime in particular. Meanwhile, the results show the EDR is more robust in uniform node distribution compared to nonuniform.