In this research, we developed a ZnSe@Co0.85Se heterojunction embedded in N-doped carbon (NC), derived from a zeolitic imidazolate framework (ZIF), for use in lithium-ion batteries (LIBs). The material, ZnSeNC@Co0.85SeNC, exhibited excellent cycling and rate performance, achieving capacities of 944.1 mAh g-1 at 1.0 A g-1 and 277.6 mAh g-1 at 10 A g-1. Full-cell tests demonstrated its effectiveness, with a specific capacity of approximately 80 mAh/g, coulombic efficiency near 99 %, and capacity retention of 64 %, corresponding to power and energy densities of 97.2 W kg- 1 and 224 Wh kg- 1, respectively. We explored the capacity enhancement mechanisms, identifying factors such as activation of crystalline Se, formation of a Se-rich solid-electrolyte interface, and capacitive contributions from reduced metal particles. Computational studies indicated that these improvements were linked to the heterojunction interface of ZnSe, Co0.85Se, and NC. Additionally, the material's potential for potassium-ion battery (PIB) applications was assessed, delivering 274.8 mAh g-1 at 1.0 A g-1. This work not only advances our understanding of transition-metal selenides (TMSe) in battery applications but also proposes design strategies for TMSe-based materials for both LIB and PIB anodes.