The effect of solvent quality on the behavior of a polyelectrolyte chain near a charged surface is studied using molecular dynamics simulation with explicit solvent. The polyion adsorbs completely on the surface for a high enough surface charge density, and the surface charge required for complete adsorption becomes lower as the solvent quality is decreased. Several static and dynamic properties display a nonmonotonic dependence on surface charge density and solvent quality. For a given value of solvent quality the component of the radius of gyration (Rg) parallel to the surface is a nonmonotonic function of the surface charge density, and for a given surface charge density the component of Rg perpendicular to the surface is a nonmonotonic function of the solvent quality. The center-of-mass diffusion coefficient and rotational relaxation time are nonmonotonic functions of the surface charge density. Translational diffusion coefficient increases, and the rotational relaxation time decreases as solvent quality is decreased for a fixed surface charge density.