Trifunctional catalysts show a great potential for use in a power-to-gas water-splitting devices for hydrogen gas production, powered by an integrated rechargeable zinc-air battery. None of the currently available commercial electrocatalysts is low cost, and they do not possess excellent catalytic activity and durability at the same time, which is the main barrier to the broad implementation of these technologies. Herein, we design and develop a novel nanostructured trifunctional electrocatalyst that is capable of catalyzing oxygen/hydrogen evolution and oxygen reduction reactions. The combination of non-precious Co, Co9S8, and S, N co-doped graphitic carbon synergistically provides highly active sites for efficient catalytic reactions, while the unique tubular morphology and hierarchically porous microstructure not only benefit fast access to active sites but also ensure a robust composite structure for durability. When applied to zinc-air batteries and water splitting, these systems exhibit performance superior to those of commercial precious electrocatalysts (e.g., Pt/C and Ir/C).