  We investigate the performance of a quantum battery exposed to local
Markovian and non-Markovian dephasing noises. The battery is initially prepared
as the ground state of a one-dimensional transverse $XY$ model with open
boundary condition and is charged (discharged) via interactions with local
bosonic reservoirs. We show that in the transient regime, quantum battery (QB)
can store energy faster and has a higher maximum extractable work, quantified
via ergotropy, when it is affected by local phase-flip or bit-flip Markovian
noise compared to the case when there is no noise in the system. In both the
charging and discharging processes, we report the enhancement in work-output as
well as in ergotropy when all the spins are affected by non-Markovian Ohmic
bath both in the transient and the steady-state regimes, thereby showing a
counter-intuitive advantage of decoherence in QB. Both in Markovian and
non-Markovian cases, we identify the system parameters and the corresponding
noise models which lead to maximum enhancement of work-output and ergotropy.
Moreover, we show that the benefit due to noise persists even with the initial
state being prepared at a moderate temperature.
