The effect of adverse pressure gradient (APG) on near-wall turbulence is studied, with a particular attention to the turbulence production mechanism. A plane turbulent Couette flow is considered for several values of constant APG in the lower wall region. A direct numerical simulation (DNS) in a large computational domain shows that turbulence near the lower wall continues to exist even at sufficiently large APGs. On increasing the APG, the cross-streamwise turbulence intensities increase, and the near-wall streaks gradually disappear. A linear analysis using the optimal transient growth indicates that the APG inhibits the generation of near-wall streaks due to the significant reduction of the mean shear in the region near the lower wall. The turbulent fluctuation dynamics beyond the linear regime is studied with a DNS in a minimal flow unit. The near-wall self-sustaining process involving streaks is significantly weakened or destroyed as APG increases, while the turbulent fluctuations become more isotropic and localised. Using a conditional averaging analysis, a new mechanism of near-wall turbulence production under strong APG is uncovered. This mechanism is initiated by the wall-normal nonlinear transport of an outer wall-normal velocity fluctuation to the near-wall region. The transported wall-normal velocity fluctuation is subsequently amplified via the Orr mechanism, resulting in the non-zero turbulence production involving spatially localised vortical structures. This mechanism is also confirmed by DNS of the flow in a large computational domain, where strong correlation between the wall-normal nonlinear transport and turbulence production is observed.