Quantum batteries are a promising technology that could surpass their classical counterparts and play a critical role in the advancement of quantum technologies. In this work, we develop a quantum machine learning algorithm to improve the charging power of quantum batteries. To model an N-cell quantum battery, we use a quantum circuit with N quantum bits. During the charging process, we apply a set of quantum gates with trainable parameters to the circuit. Next, we evaluate the power extraction and optimize it using a classical computer. We find a remarkable maximum power when increasing N. Our work has the potential to create sustainable and scalable energy storage technologies in the future