Compared with single lithium or sodium, lithium-sodium alloy has better performance. In-situ electrochemical preparation of lithium sodium alloy is successfully achieved in button battery which is charged and discharged under gradient current density by using sodium metal as the positive electrode, lithium metal as the negative electrode, and LiPF6, NaClO4 or lithium sodium mixed ion electrolyte as the electrolyte. Benefiting from the synergistic effect of lithium and sodium double electrochemically active ions, the lithium-sodium mixed ion capacitors with different lithium contents as negative electrodes show good electrochemical performance. In particular, with lithium sodium alloy with high lithium content as the negative electrode and NaClO4 electrolyte added, Carbon derived from sodium citrate (Sodium citrate derived carbon, SCDC-activated) maintains the high specific capacity of 238 mA·h/g and the capacity retention rate of 99% at the current density of 1 A/g for 300 cycles. With the addition of lithium-sodium mixed ion electrolyte, SCDC-activated exhibits the specific capacity of 319 mA·h/g, and it can retain 93 mA·h/g and 98% capacity retention rate after 1040 cycles.