We found for the first time that interleukin-10 derived from optogenetic-activated astrocytes protected blood-brain barrier integrity by decreasing the activity of matrix metallopeptidase 2 and attenuated neuronal apoptosis, which provided a novel therapeutic approach and target in the acute stage of ischemic stroke. Here, IL10 is linked to ischemic stroke.