Our previous studies found that sensory nerve tracts implanted in tissue-engineered bone (TEB) could result in better osteogenesis. To explore the mechanism of the sensory nerve promoting osteogenesis in TEB in vitro, a transwell coculture experiment was designed between dorsal root ganglion (DRG) cells and bone marrow mesenchymal stem cells (BMSCs). BMSC proliferation was determined by CCK8 assay, and osteo-, chondro-, and adipogenic differentiation were assessed by alizarin red, alcian blue, and oil red staining. We found that the proliferation and multipotent differentiation of BMSCs were all enhanced in the coculture group compared to the BMSCs group. Crystal violet staining showed that the clone-forming ability of BMSCs in the coculture group was also enhanced and mRNA levels of Sox2, Nanog, and Oct4 were significantly upregulated in the coculture group. Moreover, the autophagy level of BMSCs, regulating their stemness, was promoted in the coculture group, mediated by the AMPK/mTOR pathway. In addition, AMPK inhibitor compound C could significantly downregulate the protein expression of LC3 and the mRNA level of stemness genes in the coculture group. Finally, we found that the NK1 receptor antagonist, aprepitant, could partly block this effect, which indicated that substance P played an important role in the effect. Together, we conclude that DRG could maintain the stemness of BMSCs by enhancing autophagy through the AMPK/mTOR pathway in a transwell coculture system, which may help explain the better osteogenesis after implantation of the sensory nerve into TEB.