  We present an ab initio study of the structural, electronic, and quantum
transport properties of B-N-complex edge-doped graphene nanoribbons (GNRs). We
find that the B-N edge codop-ing is energetically a very favorable process and
furthermore can achieve novel doping effects that are absent for the single B
or N doping. The compensation effect between B and N is predicted to generally
recover the excellent electronic transport properties of pristine GNRs. For the
zigzag GNRs, however, the spatially localized B-N defect states selectively
destroy the doped-side spin-polarized GNR edge currents at the valence and
conduction band edges. We show that the energetically and spatially
spin-polarized currents survive even in the fully ferromagnetic metallic state
and heterojunction configurations. This suggests a simple yet ef-ficient scheme
to achieve effectively smooth GNR edges and graphene-based spintronic de-vices.
