The first noted use of “serendipity” in the English language was by Horace Walpole (1717–1797). In a letter to Horace Mann (dated 28 January 1754) he said he formed it from the Persian fairy tale The Three Princes of Serendip, whose heroes “were always making discoveries, by accidents and sagacity, of things they were not in quest of”. The name stems from Serendip, an old name for Sri Lanka (aka Ceylon), from Arabic Sarandib. Parts of Sri Lanka were under the rule of South Indian kings for extended periods of time in history. Kings of Kerala, India (Cheranadu)were called Chera Kings and dheep means island, the island belonging to Chera King was called Cherandeep, hence called Sarandib by Arab traders.
Here is more, and for the pointer I thank Vivian.