A finite-volume method based on the OpenFOAM is used to numerically study the factors affecting the migration of viscoelastic droplets on rigid surfaces with wettability gradients. Parameters investigated include droplet size, relaxation time, solvent viscosity, and polymer viscosity of the liquid comprising droplets. The wettability gradient is imposed numerically by assuming a linear change in the contact angle along the substrate. As reported previously for Newtonian droplets, the wettability gradient induces spontaneous migration from hydrophobic to hydrophilic region on the substrate. The migration of viscoelastic droplets reveals the increase in the migration speed and distance with the increase in the Weissenberg number. The increase in droplet size also shows the increase in both the migration speed and distance. The increase in polymer viscosity exhibits the increase in migration speed but the decrease in migration distance.