The phrase comes from a passage in Mencius that goes: "Neither in burying the dead, nor in changing his abode, does a man go beyond the confines of his village. If those who own land within each well-field befriend one another both at home and abroad, help each other to keep watch and succor each other in illness, they will live in love and harmony."
孟子答滕文公問井田施行辦法時說：「死無出鄉，鄉田同井、出入相友、守望相助、疾病相扶持，則百姓親睦。」