We have reported the electronic, magnetic and optical properties of carbon doped bilayer hexagonal boron nitride (h-BN) using thedensity functional theory. A single Cdoping at B/N sites gives the large band gap similar to dilute magnetic semiconducting behaviour with a finite net magnetic moment of 1.001 and 0.998μ B , respectively.For double doping at B/N sites the net magnetic moment increases to 1.998 and 1.824μ B , respectively. Upon C-doping at N-site, we obtained transition from nonmagnetic semiconductor (pristine) ! magnetic semiconductor (1C) ! half-metal ferromagnetic (2C) ! metal (3C). In case of the B site, we observed metallic behaviour for 2C-doping. As 1,2 C-doping at the B site reduces the energy band gap from 1.8 eV to 0.81 eV, falls in the visible range and offers an opportunity to utilized as a photocatalyst material. C-doped systems show a magnetic semiconducting behavior crucial for spintronic applications.