"And Isaac went to Abimelech" (Genesis 26:1). He sought to go down to Egypt. Immediately the Holy One, blessed be He, revealed Himself to him. He said to him: "Do not go down to Egypt" (ibid. 26:2). Abraham went down, but Isaac did not go down. And why did He not say it to Abraham, but only to Isaac, "Do not go down to Egypt"? Rabbi Hoshaya said: The Holy One, blessed be He, said to him: Isaac, your father, who came from outside the Land, went down to Egypt; but you, who were born in the Land of Israel, and you are a pure burnt-offering — shall you go down?! Therefore, "Do not go down to Egypt."
Why Isaac Was Forbidden to Go Down to Egypt as a Pure Offering
Midrash Tanchuma Buber, Toldot 6:1
וילך יצק אל אבימלך וגו' (בראשית כו א). בקש לירד למצרים מיד נגלה עליו הקב"ה, א"ל אל תרד מצרימה (שם ב), אברהם ירד, ויצחק לא ירד, ולמה לא אמר לאברהם אלא ליצחק אל תרד מצרימה, אמר ר' הושעיא א"ל הקב"ה יצחק, אביך שבא מחוצה לארץ ירד למצרים, אבל אתה שנולדת בארץ ישראל ואתה עולה טהורה תרד בתמיה, לפיכך אל תרד מצרימה