The revelation of The Majestic Quran started in Makkah, the city of the Messenger’s birth in the year 610 CE. He ﷺ received the first revelation of Surat Al-Alaq whilst he was on a spiritual retreat in the cave of Hira on Jabal-e-Noor (Mount of Light).
“Recite in the name of your Lord Who created, created humans from clustered germ-cells. Recite! “Your Lord is the Most Generous”, Who taught with the Pen, He taught humans what they didn’t know.”
For the next 13 years, he ﷺ received revelation after revelation, almost 2/3 of the Quran was revealed in the city of Makkah. The rest was revealed in the city of Medina, his new hometown. During these 10 years in his new hometown, he ﷺ received the revelation that was to guide his new-found community. One of the last revelations that came to the Messenger ﷺ was at the farewell pilgrimage in the year 632 CE, where Allah says “today the disbelievers have lost hope of you abandoning your religion, don’t fear them, fear me. Today, I have completed your religion for you, I gave my favourite in full, and I am pleased that Islam is your religion” (Al-Maeda: 3).
However, when he returned to Medina in 632 CE, he ﷺ received this revelation “when God’s help and victory comes and you see masses of people entering God’s religion, then glorify and praise your Lord, and seek his forgiveness. He is ever ready to accept repentance” (Al-Nasr).
To conclude, the Quran was revealed gradually over a period of approximately 22 years, beginning in 610 CE and concluding in 632 CE, the year where the Prophet ﷺ departed from this world.