The Garuda Purana says:
अयोध्या मथुरा माया काशी काञ्ची अवन्तिका ।
पुरी द्वारावती चैव सप्तैते मोक्षदायकाः ॥
Meaning:
Ayodhya, Mathura, Maya or Mayapuri or Haridwar, Kashi or Varanasi, Kanchi or Kanchipuram, Avantika or Ujjain and Dwaravati or Dwaraka are the seven cities by visiting which one gets Moksha or Liberation and hence are called Mokshapuris.