Neural stem cells (NSCs) reside in a defined cellular microenvironment, the niche, which supports the generation and integration of newborn neurons. The mechanisms building a sophisticated niche structure around NSCs and their functional relevance for neurogenesis are yet to be understood. In the Drosophila larval brain, the cortex glia (CG) encase individual NSC lineages in membranous chambers, organising the stem cell population and newborn neurons into a stereotypic structure. We first found that CG wrap around lineage-related cells regardless of their identity, showing that lineage information builds CG architecture. We then discovered that a mechanism of temporally controlled differential adhesion using conserved complexes supports the individual encasing of NSC lineages. An intralineage adhesion through homophilic Neuroglian interactions provides strong binding between cells of a same lineage, while a weaker interaction through Neurexin-IV and Wrapper exists between NSC lineages and CG. Loss of Neuroglian results in NSC lineages clumped together and in an altered CG network, while loss of Neurexin-IV/Wrapper generates larger yet defined CG chamber grouping several lineages together. Axonal projections of newborn neurons are also altered in these conditions. Further, we link the loss of these 2 adhesion complexes specifically during development to locomotor hyperactivity in the resulting adults. Altogether, our findings identify a belt of adhesions building a neurogenic niche at the scale of individual stem cell and provide the proof of concept that niche properties during development shape adult behaviour.