A metal-free porphyrin T4PP with a pyridine group is proposed as a new electrode for lithium/sodium-based dual-ion batteries (LDIBs/SDIBs). The electrochemical performance and reaction mechanism of T4PP are explored thoroughly. The extended porphyrin conjugated structure by the pyridine groups enables an excellent cycle life (5000 cycles) and a high-power density (18.7 kW kg -1 ). A hybrid charge-storage mechanism with the contribution of both cations and anions benefits fast charge transfer.