This study investigates energy harvesting of a two-dimensional foil in the wake downstream of a cylinder. The foil is passively mobile in the transverse direction. An immersed boundary (IB) method with a fluid–structure interaction (FSI) model is validated and employed to carry out the numerical simulation. For improving numerical stability, this study incorporates a modified low-storage first-order Runge–Kutta scheme for time integration and demonstrates the performance of this temporal scheme on reducing spurious pressure oscillations of the IB method. The simulation shows the foil emerged in a vortical wake achieves better energy harvesting performance than that in a uniform flow. The types of the dynamic response of the energy harvester are identified, and the periodic response is desired for optimal energy harvesting performance. Last, the properties of vortical wakes are found to be of pivotal importance in obtaining this desired periodic response.