  We examine the electronic structure of recently fabricated in-plane
heterojunctions of zigzag graphene nanoribbons embedded in hexagonal boron
nitride. We focus on hitherto unexplored interface configurations in which both
edges of the nanoribbon are bonded to the same chemical species, either boron
or nitrogen atoms. Using ab initio and mean-field Hubbard model calculations,
we reveal the emergence of one-dimensional magnetic conducting channels at
these interfaces. These channels originate from the energy shift of the
magnetic interface states that is induced by charge transfer between the
nanoribbon and hexagonal boron nitride. We further address the response of
these heterojunctions to external electric and magnetic fields, demonstrating
the tunability of energy and spin splittings in the electronic structure. Our
findings establish that zigzag graphene nanoribbon/hexagonal boron nitride
heterojunctions are a suitable platform for exploring and engineering spin
transport in the atomically thin limit, with potential applications in
integrated spintronic devices
