The electronic properties of h-BC2N / g-C6N6 nanoribbons were calculated using the first principles method. Three states of ferromagnetic, antiferromagnetic, and paramagnetic coupling were set. The energy of the ferromagnetic coupling state was found to be the lowest, indicating that the final stable state was the ferromagnetic coupling state. The thermodynamic stability was also verified in the ferromagnetic coupling state. The h-BC2N / g-C6N6 nanoribbons itself is magnetic with a magnetic moment of 2μB and is a direct narrow band gap semiconductor material. In order to change the electronic properties, six different atoms (B, C, N, Al, Si, P) were adsorbed in the h-BC2N / g-C6N6 nanoribbon, and their band structure and charge density were studied. The results show that the adsorption of different atoms in h-BC2N / g-C6N6 nanoribbons will produce different results. Among them, the adsorption of N and P atoms changes its properties from a semiconductor to a half-metal, which can generate a 100% polarized current in the Fermi surface. This provides more development directions for spintronics devices.