Limitations in instrument resolution mean that soil samples analysis using energy-dispersive X-ray fluorescence (EDXRF) often produced overlapping spectral peaks of heavy metals with similar energies. This overlapping of spectral peaks posed a significant problem in the quantitative analysis of heavy metals in soil samples. Therefore, it was necessary to decompose the overlapping peaks. In this paper, a new method for decomposing overlapping peaks was presented in the context of Gaussian Mixture Model (GMM) parameter estimation, combining the k-means algorithm and the African Vulture Optimization Algorithm (AVOA). The data acquired from EDXRF instruments were preprocessed before being input to the k-means algorithm, which produces the output used to initialize the parameters of the GMM. Subsequently, AVOA was employed to optimize the GMM parameters based on a fitness function derived from the data. Ultimately, the optimized GMM parameters obtained through the AVOA process yield the optimal solution for the decomposition of overlapping peaks. This approach effectively addressed the challenge of peak overlap in the determination of heavy metals in soil by EDXRF. Soil samples were obtained from national standard samples, peach gardens, and vegetable-growing regions. The results showed that the maximum absolute errors for the peak channel and peak area were 1.46% and 6.37%, respectively. A comparison of the proposed model with others models indicated that the k-means-GMM-AVOA model exhibits the best performance in terms of speed, accuracy, and stability.