Numerical simulations are performed to study the influence of spanwise oscillations on the three-dimensional flows around low-aspect-ratio flat-plates at a low Reynolds number of 300. The harmonic spanwise oscillations of the plate are controlled by two parameters: the reduced frequency k and the dimensionless amplitude Ay. It is found that in a certain range of the parameter space (k, Ay), spanwise oscillations are effective in enhancing the average lift and augmenting the average lift-to-drag ratio. To elucidate the mechanism of lift enhancement due to the spanwise oscillations, the wake structures behind flat-plates with and without spanwise oscillations are compared. It is observed that the spanwise oscillation stabilizes the leading-edge vortex and presses it to a place very close to the upper surface. Since a leading-edgevortex corresponds to a low-pressure core, the stably attached leading-edge vortex benefits liftproduction. This lift-enhancement mechanism is also verified by using a simplified lift formula which links the lift force with the Lamb vector term. The imposed spanwise oscillation is found to enhance the vorticity transport along the spanwise direction, which in turn improves thestability of the leading-edge vortex. The results of this study provide new insight into the counterintuitive high-lift in the gliding flights of tree snakes.