In this paper, we present a data aggregated maximum lifetime routing scheme for wireless sensor networks. We address the problem of jointly optimizing data aggregation and routing so that the network lifetime can be maximized. A recursive smoothing method is adopted to overcome the non-differentiability of the objective function. We derive the necessary and sufficient conditions for achieving the optimality of the optimization problem and design a distributed gradient algorithm accordingly. Extensive simulations are carried out to show that the proposed algorithm can significantly reduce the data traffic and improve the network lifetime. The convergence property of the algorithm is studied under various network configurations.