Numbers 27:17
15 Then Moses spoke to the Lord: 16 “Let the Lord, the God of the spirits of all humankind, appoint a man over the community, 17 who will go out before them, and who will come in before them, and who will lead them out, and who will bring them in, so that the community of the Lord may not be like sheep that have no shepherd.” 18 The Lord replied to Moses, “Take Joshua son of Nun, a man in whom is the Spirit, and lay your hand on him; 19 set him before Eleazar the priest and before the whole community, and commission him publicly.
Isaiah 13:14
12 I will make human beings more scarce than pure gold and people more scarce than gold from Ophir. 13 So I will shake the heavens, and the earth will shake loose from its foundation, because of the fury of the Lord of Heaven’s Armies, in the day he vents his raging anger. 14 Like a frightened gazelle or a sheep with no shepherd, each will turn toward home, each will run to his homeland. 15 Everyone who is caught will be stabbed; everyone who is seized will die by the sword. 16 Their children will be smashed to pieces before their very eyes; their houses will be looted and their wives raped.
Notes and References
"... The “sheep who have no shepherd” is an Old Testament expression that occurs several times; it should not be restricted to the sense of an individual Old Testament text. (Numbers 27:17; 2 Kings 22:17; 2 Chronicles 18:16; Judith 11:19; Ezekiel 34:5 ...) However, it is clear from the Old Testament language that one is thinking of the people of Israel. The open formulation permits a variety of understandings of need. For Matthew obviously the entire nation is in need. The stories of the sick told in chapters 8 and 9 are representative of all the people ..."
Luz, Ulrich, and Helmut Koester Matthew 8-20: A Commentary (p. 64) Fortress Press, 2001