Foraging, defense and waste disposal are essential for sustaining social insect colonies. Hence, their nest generally has an open structure, wherein specialized castes called workers and soldiers perform these tasks. However, some social aphids form completely closed galls, wherein hundreds to thousands of insects grow and reproduce for several months in isolation. Why these social aphids are not drowned by accumulated honeydew has been an enigma. Here we report a sophisticated biological solution to the waste problem in the closed system: the gall inner surface is specialized for absorbing water, whereby honeydew is promptly removed via the plant vascular system. The water-absorbing closed galls have evolved at least twice independently among social aphids. The plant-mediated waste removal, which entails insect’s manipulation of plant morphogenesis and physiology, comprises a previously unknown mechanism of nest cleaning, which can be regarded as ‘extended phenotype’ and ‘indirect social behavior’ of the social aphids.