Axon pruning is a common phenomenon in neural circuit development. Previous studies demonstrate that the engulfing action of glial cells is essential in this process. The underlying molecular mechanisms, however, remain unknown. We show that draper (drpr) and ced-6, which are essential for the clearance of apoptotic cells in C. elegans, function in the glial engulfment of larval axons during Drosophila metamorphosis. The drpr mutation and glia-specific knockdown of drpr and ced-6 by RNA interference suppress glial engulfment, resulting in the inhibition of axon pruning. drpr and ced-6 interact genetically in the glial action. Disruption of the microtubule cytoskeleton in the axons to be pruned occurs via ecdysone signaling, independent of glial engulfment. These findings suggest that glial cells engulf degenerating axons through drpr and ced-6. We propose that apoptotic cells and degenerating axons of living neurons are removed by a similar molecular mechanism.