The mechanisms driving cell migration during processes such as development, inflammation and cancer are diverse. In confined environments, cells exhibit migration modes driven by contraction of the actomyosin cortex, a thin layer of crosslinked actin filaments and associated proteins underlying the cell membrane. Nonadherent cancer cells accumulate actomyosin at the cell rear when migrating in microchannel systems and exhibit retrograde flow of cortical myosin. Varying microchannel surface properties furthermore reveals that friction between the cell and the microchannel wall is required for forward movement. Here, we present a hydrodynamic model of the cell cortex in these migrating cells. We describe the cortex as an axisymmetric, viscous surface which is confined to a cylinder where in contact with the microchannel but is free to deform at the cell poles. A decreasing gradient of active contractile tension towards the leading edge represents the activity of myosin motors incorporated in the gel. These intrinsic forces generate rearward cortical flows in the compressed cylindrical part of the cell and contraction and expansion at the back and front respectively. While forward movement itself is achieved by deformation, frictional forces between the cortex and the channel wall are required to push the cell against the surrounding fluid in the channel as the cell is moving.