Boron is a unique element in terms of electron deficiency and Lewis acidity. Incorporation of boron atoms into an aromatic carbon framework offers a wide variety of functionality. However, the intrinsic instability of organoboron compounds against moisture and oxygen has delayed the development. Here, we present boron-doped graphene nanoribbons (B-GNRs) of widths of N=7, 14 and 21 by on-surface chemical reactions with an employed organoboron precursor. The location of the boron dopant is well defined in the centre of the B-GNR, corresponding to 4.8 atom%, as programmed. The chemical reactivity of B-GNRs is probed by the adsorption of nitric oxide (NO), which is most effectively trapped by the boron sites, demonstrating the Lewis acid character. Structural properties and the chemical nature of the NO-reacted B-GNR are determined by a combination of scanning tunnelling microscopy, high-resolution atomic force microscopy with a CO tip, and density functional and classical computations.