Lithium metal has emerged as the most prospective candidate for the realization of improved battery systems. However, notorious Li dendrite formation and the huge volume effect during cycling critically impair the further practical deployment of Li metal batteries. Herein, we propose hierarchical Ni- and Co-based oxynitride (NiCoO2/CoO/Ni3N) nanoarrays with superior lithiophilicity on a three-dimensional nickel foam (NiCoON/NF) as a host for highly stable Li metal anodes. The uniform nitrogen-infused nanorod-on-nanosheet arrays present improved electrical conductivity and an increased concentration of active sites with oxygen vacancies to enhance the surface lithiophilicity, which effectively facilitates homogeneous Li nucleation/growth. Moreover, the hyperbranched structure can induce a homogeneous distribution of Li-ion flux, owing to the enlarged surface area, thereby providing sufficient space to store deposited lithium and relieve the volume expansion. Consequently, the NiCoON/NF host delivers a high Coulombic efficiency (98.4% over 600 cycles) at 1 mA cm-2 and an ultralong lifespan (> 2000 h) under a high capacity of 3 mAh cm-2. Remarkably, a Li@NiCoON/NF-LiFePO4 full battery also reveals impressive electrochemical performance. This work demonstrates new insights into safe rechargeable Li metal batteries.