We present a two-dimensional numerical study for uniform flow past a streamwise oscillating square cylinder at a Reynolds number of 200. To overcome the limitations with an oscillating inlet flow as used in earlier studies, a dynamic meshing feature is used to oscillate the cylinder. A parametric study is carried out by varying amplitude and frequency of cylinder oscillation. Two symmetric modes, named here as S-II-I and S-IV-D, have been found. In S-II-I mode, a pair of vortices are shed symmetrically on each side of the cylinder in one cycle (S-II mode), and in S-IV-D mode, two pairs of vortices of opposite sense are shed on each side of the cylinder. A vortex flapping mode has also been obtained for low to moderate amplitude and frequency ratios. A new mode of vortex shedding termed the “vortex dipole” mode is found and involves the alternate arrangement of vortex pairs unlike the zigzag arrangement of single vortices in a Kármán vortex street. As in most nonlinear oscillators, vortex shedding becomes chaotic when forced sufficiently strongly and is usually associated with nonlinear interactions between competing frequencies. Many modes observed in the current study become chaotic when the peak cylinder velocity becomes comparable with the inlet velocity. The 0-1 test for chaos is applied to the time series of lift coefficient to show that the signals are truly chaotic. We also observe chaos due to mode competition when shedding transitions from an antisymmetric to symmetric modes.