Linear cascades are commonly used as surrogate geometries when performing fundamental studies of turbomachinery blading. Several effects are not accounted for in linear cascades, such as the relative motion between blade and endwall. In this study, three different relative endwall velocities are analyzed. The effect of the relative motion between endwall and blade in a linear compressor cascade is studied through direct numerical simulations. Results show a significant change in the secondary flow structure within the passage. Most notably, the tip leakage vortex is displaced away from the blade. Still, the blade spanwise range affected by the secondary flow field is similar to the case without relative endwall motion. At the outlet plane, a stratification of the total pressure losses and the exit flow angle is found, which overshadows any blade wake effects near the endwall.