Understanding the photochemistry of organoboron compounds is essential to expand optoelectronic applications. In this work, the complete active space self-consistent field (CASSCF) and its second-order perturbation (CASPT2) methods combining with density functional theory (DFT) have been employed to investigate the elimination mechanisms of compound 6,7-dihydro-54-benzo[d]pyrido[2,1-f][1,2]azaborininr (B4) on the ground state (S0) and the first excited state (S1). B4 is one of the 1,2-B,N-heterocycles that undergo competitive thermal elimination and photoelimination depending on the substitution groups on the B atom and the chelate backbone, thus providing a high-selectivity synthesis strategy for luminescent compounds. Since the energy barrier from B4 to BH3-pyrido[1,2-a]isoindole (D1) and pyrido[1,2-a]isoindole (A1) on the ground state is lower than that from B4 to 54-benzo[d]pyrido[2,1-f][1,2]azaborininr (C4), the retraction ring reaction is expected to proceed with larger probability than the H2 elimination upon heating. On the contrary, photoelimination of H2 may take place easily due to the almost barrierless pathway on the S1 state. Remarkably, we have located an energetically available conical intersection (S1/S0)X-1, which allows for ultrafast S1 → S0 decay and subsequently generation of C4. Our results not only throw light on the experimental observations of the selectivity of thermal elimination and photoelimination but also provide detailed information on the excited state as instructional implications for further synthesis and application of B,N-embedded aromatics.