Electromagnetic scattering by dielectric objects in the presence of a layered medium is investigated by applying the Poggio-Miller-Chang-Harrington-Wu-Tsai (PMCHWT) equation combined with the layered medium Green's function. Due to the electric field integral equation (EFIE) operator involved, the spectrum of the PMCHWT equation is also undesired. When the surface is densely discretized, the condition of the resulting matrix is extremely bad. An effective Calderón preconditioner is developed in this paper to improve the convergence. Different from its free space counterpart, the Calderón identities for inhomogeneous medium need to be re-derived. It is shown from numerical examples that the convergence of the PMCHWT system in layered medium can be significantly improved by using the proposed Calderón preconditioner.