We have performed density functional theory (DFT) calculations to study the gas (CO, CO2, NO, and NO2) sensing mechanism of pure and doped (B, N, and B-N) graphene surfaces. The calculated adsorption energies of the various toxic gases (CO, CO2, NO, and NO2) on the pure and doped graphene surfaces show, doping improves adsorption energy and selectivity. The electronic properties of the B-Ngraphene surfaces change significantly compared to pure and B and Ngraphene surfaces, while selective gas molecules are adsorbed. So, we report B-N codoping on graphene can be highly sensitive and selective for semiconductor-based gas sensor. © 2015 American Chemical Society.