Dual-energy computed tomography (CT) has the potential to decompose tissues into different materials. However, the classic direct inversion (DI) method for multimaterial decomposition (MMD) cannot accurately separate more than two basis materials due to the ill-posed problem and amplified image noise. We propose an integrated MMD method that addresses the piecewise smoothness and intrinsic sparsity property of the decomposition image. The proposed MMD was formulated as an optimization problem including a quadratic data fidelity term, an isotropic total variation term that encourages image smoothness, and a nonconvex penalty function that promotes decomposition image sparseness. The mass and volume conservation rule was formulated as the probability simplex constraint. An accelerated primal-dual splitting approach with line search was applied to solve the optimization problem. The proposed method with different penalty functions was compared against DI on a digital phantom, a Catphan® 600 phantom, a quantitative imaging phantom, and a pelvis patient. The proposed framework distinctly separated the CT image up to 12 basis materials plus air with high decomposition accuracy. The cross talks between two different materials are substantially reduced, as shown by the decreased nondiagonal elements of the normalized cross correlation (NCC) matrix. The mean square error of the measured electron densities was reduced by 72.6%. Across all datasets, the proposed method improved the average volume fraction accuracy from 61.2% to 99.9% and increased the diagonality of the NCC matrix from 0.73 to 0.96. Compared with DI, the proposed MMD framework improved decomposition accuracy and material separation.