The search for a potential system with desirable electronic properties for sensing and delivering lomustine anticancer drugs led us to the porous B6N6 covalent organic framework (COF). The capability of B6N6 for the recognition and delivery of lomustine investigated using density functional theory calculations at GGA/PBE/DNP computational level. The most stable S1 complex results from the interaction of drug oxygen atoms with the B atom and the B–B bond of the considered COF. The lomustine adsorption causes a remarkable decrease of 83.6% in the band gap (Eg) of the B6N6 moiety in the most stable complexes. The recovery time for this complex at cancer cell temperature are acceptable values of 1.99 × 10–6 and 0.0016 s in the presence and absence of UV irradiation, respectively. The lomustine drug released from the desired carrier in the presence of an external electric feld along the z-axis. It is concluded that B6N6 is a potential sensor and drug delivery system for lomustine while treating cancerous tissues