A metal hydride is used for the first time as anode in a complete all-solid-state battery with sulfur as cathode and LiBH4 as solid electrolyte. The hydride is a nanocomposite made of MgH2 and TiH2 counterparts. The battery exhibits a high reversible capacity of 910 mAh g−1 with discharge plateaus at 1.8 V and 1.4 V. Moreover, the capacity remains to 85% of the initial value over the 25 first charge/discharge cycles.