Etymology: "Ennui" and "annoy" were borrowed from the same French word at different points of development of the French language. It all started with the Latin idiomatic phrase, mihi in odio est "I hate or dislike" (literally, “for me [mihi] it is [est] in odiousness [in odio]”). This phrase reduced to a single verb, *inodiare “to make odious” which served as the source of the Old French verb anoier “to annoy, bore.” This verb was borrowed into English around 1275 as anoien, our "annoy" today. Later the Old French verb developed into ennuyer from which arose the noun "ennui" in modern French. This noun acquired the sense “boredom” and was then borrowed again, this time in its new form, in the 18th century, no doubt, to distinguish the complex apathy of the upper class from the simple boredom of the lower.1 dard-e-sar + fra. causer des ennuis pour qqn : barâ yaš dard-e-sar dorost kardan, dard-e-sar-sâz budan, kâr dast aš dâdan
2 eng. dull (del-)xasta-gi xwâb-âvar-i kesel-i cang i be del na zadan malâl + Boredom is (...) a vital problem for the moralist, since half the sins of mankind are caused by the fear of it.
(B. RUSSELL, ‘The Conquest of Happiness’ (1930) ch. 4) + A bore is a man who deprives you of solitude without providing you with company.