Acoustic metasurfaces are mostly designed in a static medium, ignoring the influence of flow characteristics. However, in actual aeroacoustic noise reduction, e.g., aircraft engine liner design, the background flow can have effects on the sound performance of acoustic metasurfaces, especially for a viscous shear flow. The effect of a viscous shear flow is often neglected in previous studies on the design and sound field prediction of acoustic metasurfaces. For considering the viscous and thermal dissipation effects, an analytical model is developed to predict the sound field of a periodic metasurface in a viscous shear boundary layer. In this model, the effective impedance based on the high-frequency limits is utilized to consider both the actual impedance of the acoustic metasurface and the effect of a finite-thickness viscous shear boundary layer. An acoustic metasurface designed in the static medium or even redesigned with only the effect of an inviscid shear flow is not suitable for wave manipulation when the Reynolds number (Re) changes significantly, since the viscosity is an important and non-negligible factor affecting the sound performance. For the cases in this work, the sound performance gradually deteriorates with the decrease in Re when Re≥5×106. When Re≤1×106, especially at Re=1×105, the existence of viscous shear flows could result in the destruction of expected anomalous reflection and significant intensity change of the reflected waves. This research provides a method for the design of acoustic metasurfaces under viscous shear flow conditions, which is significant for future aeroacoustic applications.