Metal and beam-hardening artifacts are tough issues in Computed Tomography (CT) images. This paper proposes an iterative Maximum A Posteriori (MAP) reconstruction algorithm aiming to reduce both of them. This algorithm is based on a multi-energy acquisition system, a Gaussian noised measuring model and a basis material decomposition formula. In the Multi-Energy Computed Tomography (MECT) system, an energy discriminant detector which can measure the flux of photons at different energies is supposed to be employed. Our method can reconstruct two separate base material density maps where the metal and beam-hardening artifacts are highly reduced.