We present first-principles calculations of the structural and electronic properties of possible graphitelike BC4N constructed from 3r-graphite structure. Our calculation results show that the hexagonal BC4N structure stacked with one B-N layer and two C-C layers has the lowest total energy among all constructed BC4N structures. The calculated negative formation energy indicates that it may be synthesized from 3r-graphite and 3r-BN. Its stability has been further confirmed by mechanical stability criteria. The electronic properties show that it is a narrow band gap semiconductor.