The integrated in-plane growth of graphene nanoribbons (GNRs) and hexagonal boron nitride (h-BN) could provide a promising route to achieve integrated circuitry of atomic thickness. However, fabrication of edge-specific GNRs in the lattice of h-BN still remains a significant challenge. Here we developed a two-step growth method and successfully achieved sub-5-nm-wide zigzag and armchair GNRs embedded in h-BN. Further transport measurements reveal that the sub-7-nm-wide zigzag GNRs exhibit openings of the bandgap inversely proportional to their width, while narrow armchair GNRs exhibit some fluctuation in the bandgap-width relationship. An obvious conductance peak is observed in the transfer curves of 8- to 10-nm-wide zigzag GNRs, while it is absent in most armchair GNRs. Zigzag GNRs exhibit a small magnetic conductance, while armchair GNRs have much higher magnetic conductance values. This integrated lateral growth of edge-specific GNRs in h-BN provides a promising route to achieve intricate nanoscale circuits.