In the present investigation, the capability of the pristine pentagonal BCN (penta-BCN) nanosheet for sensing and drug delivery of the nitrosourea and hydroxyurea anticancer drugs has been examined through the periodic density functional theory. The adsorption and sense effect of these drug molecules on the structural and electronic virtues of the substrate are analyzed. The energy gap has been reduced by 57.63 % and 19.96 % after adsorbing the nitrosourea and hydroxyurea anticancer drugs respectively, so the penta-BCN nanosheet shows an electrical response to the presence of these drugs. The adsorption energy in the gas/water phases for the most stable nitrosourea/BCN and hydroxyurea/BCN complexes are − 2.7/-1.21 and − 2.53/-1.96 eV, respectively. The solvability of the drug, the surface, and the complexes in the aqueous solvent have also been examined. The thermal and dynamical stability of the structures at room temperature, by results of the NVT module of the molecular dynamics, has been confirmed. The drug release from the substrate near the target cells in an acidic environment has also been simulated. We can propose a pristine penta-BCN substrate as a potential carrier and sensor of nitrosourea and hydroxyurea anticancer drugs.