Elimelech was a leader in his generation, respected and prominent, with the material means to save his people from famine. Despite his status, he abandons his people in their time of need, including his own relatives, taking only his wife and two sons with him. Rashi says clearly that his motivation for leaving Eretz Yisrael was due to his selfishness – he did not want to share his wealth to save his people. In addition to the physical danger he abandoned his people to, his departure was an emotional blow as well. Bnei Yisrael lost all hope and succumbed to despair when he left them in the throes of a famine.
And where did he go when he left Eretz Yisrael? Of all places, he chose to go to Moav, the nation which was expressly forbidden to join the congregation of Hashem. Moav, whose very name alludes to their sinful origins. Moav, who had refused to provide food and water for Bnei Yisrael when they left Mitzrayim. In fact, unfortunately, Elimelech shared the trait of selfishness with the Moavim, so he was able to blend into their society. (Gra)