The use of a dynamic ``accordion'' lattice with ultracold atoms is demonstrated. Ultracold atoms of $^{87}\mathrm{Rb}$ are trapped in a two-dimensional optical lattice, and the spacing of the lattice is then increased in both directions from 2.2 to 5.5 $\ensuremath{\mu}$m. Atoms remain bound for expansion times as short as a few milliseconds, and the experimentally measured minimum ramp time is found to agree well with numerical calculations. This technique allows an experiment such as quantum simulations to be performed with a lattice spacing smaller than the resolution limit of the imaging system, while allowing imaging of the atoms at individual lattice sites by subsequent expansion of the optical lattice.