The gut-brain axis plays an essential role in regulating neural development in response to external environmental stimuli, such as microbes or nutrient availability. Defects in gut-brain communication usually lead to various neurological disorders. However, it remains unknown whether gut plays any intrinsic role in regulating neuronal development. Through a genetic screen in C. elegans, we uncovered that an intrinsic Wnt-endocrine pathway in gut regulates synaptic development and neuronal activity in brain. Specifically, the gut expressed neuropeptide NLP-40 upregulated by a canonical Wnt signaling, which then facilitates presynaptic assembly through regulating GPCR AEX-2 mediated neuronal spontaneous activity. Therefore, this study not only uncovers a novel synaptic development mechanism, but also reveals a novel gut-brain interaction.