Hydroxyurea (HU) and 5-Fluorouracil (FU) are well-known drugs that are widely used in the treatment of cancers. Interaction of the HU and FU molecules on the pristine graphdiyne (GDY) and BN-doped graphdiyne (BNGDY) nanosheet was evaluated by density functional theory (DFT) method in gas and solution phases. Various adsorption sites of GDY/BNGDY have been examined for different HU/FU drug orientations. The results indicate that the 18-membered ring area and top of the acetylenic linkage are the most suitable sites, unlike the hexagonal ring. The S1, S6, S8, and S10 structures are the most stable configurations for GDY/HU, GDY/FU, BNGDY/HU, and BNGDY/FU with the highest Eads about −0.598, −0.417, −1.289, and −0.603 eV in the gas phase and −0.960, −0.592, −1.599 and −1.485 eV in solution phase, respectively. For GDY + HU/FU, the highest Eads is due to interaction of hydrogen atom of drug with GDY; while, in BNGDY+HU/FU, the oxygen atom of drug interacts effectively with the boron atom of the sheet. Likewise, in GDY complexes, charge transfer occurs from sheet to drug, but it is inverse in BNGDY complexes. The band gap values of the GDY and BNGDY are 0.470 and 0.486 eV, respectively, that drug adsorption decreases them in the range of 2.34 to 22.43%. Adsorption behavior of the structures is further discussed and interpreted using quantum molecular descriptors, band structure, and PDOS diagrams. Recovery time values show that in the field of targeted drug delivery and nanomedicine, GDY and BNGDY are more suitable as carrier for the HU and FU drugs, respectively.