Blood–brain barrier (BBB) dysfunction, e.g., increase in BBB permeability, has been reported to contribute to cognitive impairment. However, the effects of anesthesia and surgery on BBB permeability, the underlying mechanisms, and associated cognitive function remain largely to be determined. Here, we assessed the effects of surgery (laparotomy) under 1.4% isoflurane anesthesia (anesthesia/surgery) for 2 h on BBB permeability, levels of junction proteins and cognitive function in both 9- and 18-month-old wild-type mice and 9-month-old interleukin (IL)-6 knockout mice. BBB permeability was determined by dextran tracer (immunohistochemistry imaging and spectrophotometric quantification), and protein levels were measured by Western blot and cognitive function was assessed by using both Morris water maze and Barnes maze. We found that the anesthesia/surgery increased mouse BBB permeability to 10-kDa dextran, but not to 70-kDa dextran, in an IL-6-dependent and age-associated manner. In addition, the anesthesia/surgery induced an age-associated increase in blood IL-6 level. Cognitive impairment was detected in 18-month-old, but not 9-month-old, mice after the anesthesia/surgery. Finally, the anesthesia/surgery decreased the levels of β-catenin and tight junction protein claudin, occludin and ZO-1, but not adherent junction protein VE-cadherin, E-cadherin, and p120-catenin. These data demonstrate that we have established a system to study the effects of perioperative factors, including anesthesia and surgery, on BBB and cognitive function. The results suggest that the anesthesia/surgery might induce an age-associated BBB dysfunction and cognitive impairment in mice. These findings would promote mechanistic studies of postoperative cognitive impairment, including postoperative delirium.