It is still disputable to answer definitely who and when discovered coffee.
The story of Kaldi, the 9th-century Ethiopian goat herder who discovered coffee while searching for his goats is considered apocryphal – credible evidence unavailable.
Kaldi, noticing that when his flock nibbled on the bright red berries of a certain bush they became more energetic (jumping goats), chewed on the fruit himself. His exhilaration prompted him to bring the berries to a holy man in a nearby monastery. But the holy man disapproved of their use and threw them into a fire, from which an enticing aroma billowed. The roasted beans were quickly raked from the embers, ground up, and dissolved in hot water, yielding the world’s first cup of coffee.
Other accounts attribute the discovery of coffee to Sheik Omar, who was known for his ability to cure the sick through prayer, was once exiled from Mocha, Yemen to a desert cave near Ousab. Starving, Omar chewed berries from nearby shrubbery, but found them to be bitter. He tried roasting the seeds to improve the flavor, but they became hard. He then tried boiling them to soften the seed, which resulted in a fragrant brown liquid. Upon drinking the liquid Omar was revitalized and sustained for days.
The earliest credible evidence of either coffee drinking or knowledge of the coffee tree appears in the middle of the 15th century, in the Sufi monasteries around Mokha in Yemen. It was here in Arabia that coffee seeds were first roasted and brewed, in a similar way to how it is now prepared. By the 16th century, it had reached the rest of the Middle East, Persia, Turkey, and northern Africa.