The deployment of renewable energy technologies, such as solar photovoltaics and wind turbines, poses challenges in terms of electricity grid stability due to the intermittent nature of such energy sources, which creates a need for innovative storage solutions. We demonstrate a metal hydride-based hybrid electrochemical system that enables a solid-oxide fuel cell to operate in both fuel cell mode and battery mode, allowing for un-interrupted electricity generation. In the fuel cell mode, the device acts as a conventional fuel cell and converts the chemical energy stored in fuels into electrical energy. In the battery mode, the metal hydride near the anode releases hydrogen and quickly responds to fuel supply interruption or power demand surges. The concept demonstrated here is a promising way to provide a robust and economical solution for balancing power supply and demand for the electrical grid of the future.