Historically, Nevşehir was a small village, called Nyssa, founded on the slopes of Mount Kahveci, in the valley of Kızılırmak (the ancient Halys) by the Hittites. It later came under the rule of the Assyrians, who were taken over by the Persian emperor Cyrus the Great in 546 BC. In 333 BC Alexander the Great defeated the Persians. After the collapse of his empire, the Cappadocian Kingdom was formed with Mazaka (present-day Kayseri) as capital. Nyssa became part of the Roman empire, when the Romans invaded the region in the first century BC. Centuries later it was ruled by the Byzantines.
The Christian theologian and saint Gregory of Nyssa was bishop of Nyssa in the late 4th century AD. Many of the churches, hewn in the rocks, date from these early years of Christianity. The underground shelters were originally built to escape persecution by the Romans. When Christianity became state religion under Constantine the Great these shelters served their purpose during raids of the Arabs or the Sassanids.
At the Battle of Manzikert (present-day Malazgirt) in 1071, the Byzantine emperor Romanos IV was defeated by the Seljuk Sultan Alp Arslan. Nyssa became part of the Seljuk empire. When this empire collapsed in 1308, Nyssa came under the control of the Ilhanid Mongols.
When the Ottoman sultan Selim I destroyed the Dulkadir Principality, Nyssa became part of the the Ottoman empire and was renamed "Muşkara". It remained a relatively insignificant settlement until the early 18th century.
The present-day city owes its foundation to the grand vizier and son-in-law of the Sultan Ahmed III, Nevşehirli Damat İbrahim Pasha who was born in Muşkara and therefore took a great interest in its construction as a city. The small village with only 18 houses, formerly under the administration of the kaza of Ürgüp, was rapidly transformed with the building of mosques (the Kurṣunlu Mosque), fountains, schools, soup kitchens, inns and bath houses, and its name was changed from Muşkara to "Nevşehir" (meaning New City in Persian and Ottoman Turkish).
The city is located at a distance of 290 km (180 mi) from the capital Ankara, and is within the historical region of Cappadocia.
The traditional main sources of income of the city, carpet weaving and viticulture have been overtaken by tourism, because of its proximity to the underground shelters, the fairy chimneys, monasteries, caravanserais and the famous rock-hewn churches of Göreme.