The divide-and-conquer (DC) scheme, the most popular linear-scaling method, is very important in the quantum mechanics computation of large systems. However, when a chemical system is divided into subsystems, its covalent bonds are often broken and then capped by complementary atoms/groups. In this paper, we show that the charge transfer between subsystems and the complementary atoms/groups causes the nonconservation of the total charge of the whole system, and this is the main source of error for the computed total energy. On the basis of this finding, an extension of the many-body expansion method (energy-based divide-and-conquer, EDC) utilizing charge conservation (E-EDC) is proposed. In the E-EDC method, initially the total energies of the whole system at different many-body correction levels are computed according to the EDC scheme. The total charges of the whole system, that is, the sum of the charges of the subsystems without cap atoms/groups at different many-body correction levels, are also computed. Then the total energy is extrapolated to the value at which the net charge of the whole system equals to the real value. Other properties such as atomic forces can also be extrapolated in a similar way. In the test of 24 and 32 glycine oligomers, this scheme reduces the error of the total energy by about 40-70%, but the computational cost is almost the same as that of the EDC scheme.