We show that non-Markovian effects of the reservoirs can be used as a resource to extract work from an Otto cycle. The state transformation under non-Markovian dynamics is achieved via a two-step process, namely an isothermal process using a Markovian reservoir followed by an adiabatic process. From second law of thermodynamics, we show that the maximum amount of extractable work from the state prepared under the non-Markovian dynamics quantifies a lower bound of non-Markovianity. We illustrate our ideas with an explicit example of non-Markovian evolution. © 2018 American Physical Society.