Optogenetics, which uses visible light to control the cells genetically modified with light-gated ion channels, is a powerful tool for precise deconstruction of neural circuitry with neuron-subtype specificity. However, due to limited tissue penetration of visible light, invasive craniotomy and intracranial implantation of tethered optical fibers are usually required for in vivo optogenetic modulation. Here we report mechanoluminescent nanoparticles that can act as local light sources in the brain when triggered by brain-penetrant focused ultrasound (FUS) through intact scalp and skull. Mechanoluminescent nanoparticles can be delivered into the blood circulation via i.v. injection, recharged by 400-nm photoexcitation light in superficial blood vessels during circulation, and turned on by FUS to emit 470-nm light repetitively in the intact brain for optogenetic stimulation. Unlike the conventional “outside-in” approaches of optogenetics with fiber implantation, our method provides an “inside-out” approach to deliver nanoscopic light emitters via the intrinsic circulatory system and switch them on and off at any time and location of interest in the brain without extravasation through a minimally invasive ultrasound interface.