Neural circuit assembly requires precise dendrite and axon targeting. We identified an evolutionarily conserved endoplasmic reticulum (ER) protein, Meigo, from a mosaic genetic screen in Drosophila melanogaster. Meigo was cell-autonomously required in olfactory receptor neurons and projection neurons to target their axons and dendrites to the lateral antennal lobe and to refine projection neuron dendrites into individual glomeruli. Loss of Meigo induced an unfolded protein response and reduced the amount of neuronal cell surface proteins, including Ephrin. Ephrin overexpression specifically suppressed the projection neuron dendrite refinement defect present in meigo mutant flies, and ephrin knockdown caused a similar projection neuron dendrite refinement defect. Meigo positively regulated the level of Ephrin N-glycosylation, which was required for its optimal function in vivo. Thus, Meigo, an ER-resident protein, governs neuronal targeting specificity by regulating ER folding capacity and protein N-glycosylation. Furthermore, Ephrin appears to be an important substrate that mediates Meigo's function in refinement of glomerular targeting.