The P2X7 ion channel is a key sensor for extracellular ATP and a key trigger of sterile inflammation. Intravenous injection of nanobodies that block P2X7 has shown to be beneficial in mouse models of systemic inflammation. P2X7 has also emerged as an attractive therapeutic target for inflammatory brain diseases. However, little is known about the ability of nanobodies to cross the BBB. Here we evaluated the ability of P2X7-specific nanobodies to reach and to block P2X7 on microglia following intravenous or intracerebral administration. For this study, we reformatted and sequence-optimized P2X7 nanobodies for higher stability and elevated isoelectric point. Following injection of nanobodies or nanobody-encoding adeno-associated viral vectors (AAV), we monitored the occupancy and blockade of microglial P2X7 in vivo using ex vivo flow cytometry. Our results show that P2X7 on microglia was within minutes completely occupied and blocked by intracerebroventricularly injected nanobodies, even at low doses. In contrast, very high doses were required to achieve similar effects when injected intravenously. The endogenous production of P2X7-antagonistic nanobodies following intracerebral or intramuscular injection of nanobody-encoding AAVs resulted in a long-term occupancy and blockade of P2X7 on microglia. Our results provide new insights into the conditions for the delivery of nanobodies to microglial P2X7 and point to AAV-mediated delivery of P2X7 nanobodies as a promising strategy for the treatment of sterile brain inflammation.