The underlying mechanisms of radiation-induced brain injury are poorly understood, although COX-2 inhibitors have been shown to reduce brain injury after irradiation. In the present study, the effect of celecoxib (a selective COX-2 inhibitor) pretreatment on radiation-induced injury to rat brain was studied by means of histopathological staining, evaluation of integrity of blood-brain barrier and detection of the expressions of inflammation-associated genes. The protective effect of celecoxib on human brain microvascular endothelial cells (HBMECs) against irradiation was examined and the potential mechanisms were explored. Colony formation assay and apoptosis assay were undertaken to evaluate the effect of celecoxib on the radiosensitivity of the HBMECs. ELISA was used to measure 6-keto-prostaglandin F1α (6-keto-PGF1α) and thromboxane B2 (TXB2) secretion. Western blot was employed to examine apoptosis-related proteins expressions. It was found that celecoxib protected rat from radiation-induced brain injury by maintaining the integrity of the blood-brain barrier and reducing inflammation in rat brain tissues. In addition, celecoxib showed a significant protective effect on HBMECs against irradiation, which involves inhibited apoptosis and decreased TXB2/6-keto-PGF1α ratio in brain vascular endothelial cells. In conclusion, celecoxib could alleviate radiation-induced brain injury in rats, which may be partially due to the protective effect on brain vascular endothelial cells from radiation-induced apoptosis.