The dynamics of a drop deforming, orienting and moving in a shear flow of a viscoelastic liquid near a wall is numerically investigated using a front-tracking finite-difference method and a semi-analytic theory. The viscoelasticity is modelled using the modified FENE-CR constitutive equation. In a Newtonian system, deformation in a drop breaks the reversal symmetry of the system resulting in a migration away from the wall. This study shows that the matrix elasticity reduces the migration velocity, the reduction scaling approximately linearly with viscoelasticity (product of the Deborah number De and the ratio of polymer viscosity to total viscosity $\beta $). Similar to a Newtonian system, for small Deborah numbers, the dynamics quickly reaches a quasi-steady state where deformation, inclination, as well as migration and slip velocities become independent of the initial drop–wall separation. They all approximately scale inversely with the square of the instantaneous separation except for deformation which scales inversely with the cube of separation. The deformation shows a non-monotonic variation with increasing viscoelasticity similar to the case of a drop in an unbounded shear and is found to influence little the change in migration. Two competing effects due to matrix viscoelasticity on drop migration are identified. The first stems from the reduced inclination angle of the drop with increasing viscoelasticity that tries to enhance migration velocity. However, it is overcome by the second effect inhibiting migration that results from the normal stress differences from the curved streamlines around the drop; they are more curved on the side away from the wall compared with those in the gap between the wall and the drop, an effect that is also present for a rigid particle. A perturbative theory of migration is developed for small ratio of the drop size to its separation from the wall that clearly shows the migration to be caused by the image stresslet field due to the drop in presence of the wall. The theory delineates the two competing viscoelastic effects, their relative magnitudes, and predicts migration that matches well with the simulation. Using the simulation results and the stresslet theory, we develop an algebraic expression for the quasi-steady migration velocity as a function of Ca, De and $\beta $. The transient dynamics of the migrating drop is seen to be governed by the finite time needed for development of the viscoelastic stresses. For larger capillary numbers, in both Newtonian and viscoelastic matrices, a viscous drop fails to reach a quasi-steady state independent of initial drop–wall separation. Matrix viscoelasticity tends to prevent drop breakup. Drops that break up in a Newtonian matrix are stabilized in a viscoelastic matrix if it is initially far away from the wall. Initial proximity to the wall enhances deformation and aids in drop breakup.