Continuous depletion of lithium resources has drawn significant attention towards the development of non-lithium rechargeable batteries utilizing inexpensive electrode materials with high ionic charge/discharge rates and appropriate storage capacity. In this study, we investigate the structural, electronic, and electrochemical properties of a 2D-C6N7 monolayer using density functional theory (DFT) calculations for its potential application as an electrode in sodium- and magnesium-based batteries. For comparison, the lithium intercalation process into this two-dimensional material was also investigated. Since the working mechanism of ion batteries is based on the intercalation and de-intercalation of metal ions, we examined various adsorption configurations for different stoichiometries of the intercalation process for each ion. According to the calculations, the systems in which a maximum of six lithium atoms, seven sodium atoms, and seven magnesium atoms are adsorbed per two C6N7 units exhibit spontaneous adsorption. These stoichiometries correspond to storage capacities of 473, 552, and 1102 m Ah/ g for the mentioned ions, respectively. The calculated average open circuit potential values for the intercalation of lithium, sodium, and magnesium ions are 1.828, 1.149, and 1.03 V, respectively. The remarkable storage capacity and average open circuit potential above one volt for the intercalation of the mentioned ions indicate that the C6N7 monolayer can be used as a cathode in rechargeable ion batteries.