Joseph Smith, the prophet of The Church of Jesus Christ of Latter-day Saints, received a revelation known as the Word of Wisdom, advising against the consumption of coffee.
In 1833, Joseph Smith received the "Word of Wisdom," a revelation outlining principles of health. This revelation, considered a commandment by many members of The Church of Jesus Christ of Latter-day Saints, specifically advises against the consumption of "hot drinks" which has been interpreted to mean coffee and tea.
The Word of Wisdom also encourages the consumption of fruits, vegetables, grains, and meat sparingly. It is found in the Doctrine and Covenants, section 89, a book of scripture used by members of the Church.
Therefore, while not phrased as a direct prohibition by Joseph Smith himself, the divine counsel received through him is interpreted as a discouragement from drinking coffee by members of The Church of Jesus Christ of Latter-day Saints.