Johnson was influenced by the vogue for exotic locations. He had read A Voyage to Abyssinia by Jerome Lobo and used it as the basis for what was described as a "philosophical romance".
Warning: wikipedia contains spoilers
The plot concerns Rasselas, son of the King of Abyssinia, who leaves his home in company with his sister, Nekayah, and a philosopher, Imlac, to seek adventure. His observation of other kinds of people eventually leads to the conclusion that there is no easy path to happiness, and he returns to Abyssinia along with his companions.