The electrocaloric effect in ferroelectrics provides a promising solid-state refrigeration technology to meet the urgent demand for heat management in the integrated circuits. Usually, ferroelectrics show a positive electrocaloric effect, i.e. the application of an electric field causes an increase in temperature. In contrast, the negative electrocaloric effect is also possible but much less explored. These two effects, if occur in the same system, could be combined to improve the cooling performance. Here we report the occurrence of both positive and negative electrocaloric effects in ferroelectric/paraelectric PbTiO3/SrTiO3 superlattice based on phase-field simulations. The superlattice is found to stabilize a variety of vortex dipole states (with the different number of vortex) when the PbTiO3 and SrTiO3 layers have suitable thicknesses. The unique response of these topological states to the external electric field gives rise to both positive and negative electrocaloric effect, and the latter is associated with the field-dependent vortex-to-polar state transformation. The multiplicity of the vortex dipole states brings tuning freedom for the optimization of electrocaloric properties. Moreover, the electrocaloric effect is also sensitive to the strength of the screening effect determined by the thickness of the SrTiO3 layer. We thus demonstrate a novel mechanism of negative electrocaloric effect in ferroelectrics with topological dipole states and indicates the screening effect as an effective way to engineer the electrocaloric performance.