A battery is a work storage device, i.e. a device that stores energy in the form of work for later use by other devices. In this work, we study the realization of a quantum battery in a double quantum dot in series, charged by two electrodes at different chemical potentials and optimized by a Markovian quantum feedback protocol. Using the concept of ergotropy as a figure of merit, we first establish a simple expression for the maximum ergotropy in a two-level system, and then find the parameters under which a Markovian feedback can achieve this optimal ergotropy. We find that quantum coherence can be used as a resource in energy storage, and we also study the influence of interaction with a phonon environment on the charging and discharging process of the battery.