Despite gel electrophoresis being one of the main workhorses of molecular biology, the physics of polyelectrolyte electrophoresis in a strongly confined environment remains poorly understood. Theory indicates that forces in electrophoresis result from interplay between ionic screening and hydrodynamics, but these ideas could so far be addressed only indirectly by experiments based on macroscopic porous gels. Here, we provide a first direct experimental test by measuring the electrophoretic force on a single DNA molecule threading through a solid-state nanopore as a function of pore size. The stall force gradually decreases on increasing the nanopore diameter from 6 to 90 nm, inconsistent with expectations from simple electrostatics and strikingly demonstrating the influence of the hydrodynamic environment. We model this process by applying the coupled Poisson-Boltzmann and Stokes equations in the nanopore geometry and find good agreement with the experimental results.