Muhammad received his first Quranic revelation in Mecca. More precisely, Islamic tradition places the event in the Cave of Hira on Jabal al-Nour, a mountain just outside Mecca in western Arabia.
The revelation is traditionally dated to 610 CE, when Muhammad was around 40 years old. During a period of solitary retreat and meditation, the angel Gabriel appeared and commanded him to recite. The first revealed passage is generally identified as the opening five verses of Surah Al-Alaq, which begin with the command to read or recite in the name of the Creator.
A common mix-up is Medina, where Muhammad later established the first Muslim community after emigrating there in 622 CE. Taif was also significant in his life, especially during a difficult preaching journey, but it was not the location of the first revelation. Jerusalem is associated with the Night Journey and the direction of early prayer, not the beginning of Quranic revelation.