Yes, আল-কুরআন permits leaving মিনা on the 12th after stoning all three জামারাত, but you must depart before sunset — if sunset catches you in মিনা, you must stay and stone on the 13th.
Yes, আল-কুরআন explicitly permits early departure from মিনা: 'Whoever hastens [departure] on the second day (12th), there is no sin upon him; and whoever delays, there is no sin upon him — for the one who has taqwa (God-consciousness)' (কুরআন 2:203). This early departure is called Nafr Awwal (first departure), while staying until the 13th is called Nafr Thani (second departure).
To leave on the 12th, you must: complete the stoning of all three জামারাত on the 12th in the correct order (after Dhuhr according to the majority), and then depart from মিনা before sunset. The critical deadline is sunset — if the sun sets while you are still within the boundaries of মিনা, the majority of scholars say you become obligated to stay the night and perform the stoning on the 13th as well.
Both options are equally valid with no sin attached to either choice. However, staying until the 13th and completing all the rites is considered more virtuous by the majority of scholars, as নবী করীম (সাল্লাল্লাহু আলাইহি ওয়া সাল্লাম) stayed until the 13th. Practically, early departure on the 12th also means less crowding when performing the farewell তাওয়াফ in মক্কা মুকাররমা, which is a consideration for large groups with fixed travel schedules. If you choose Nafr Awwal, do not delay after stoning — proceed to depart মিনা promptly to avoid being caught by sunset.
فَمَن تَعَجَّلَ فِي يَوْمَيْنِ فَلَا إِثْمَ عَلَيْهِ وَمَن تَأَخَّرَ فَلَا إِثْمَ عَلَيْهِ
Whoever hastens departure from মিনা in two days, there is no sin upon him; and whoever delays, there is no sin upon him — for the one who fears Allah.
Source: Ibn Kathir, Tafsir al-কুরআন al-Azim; al-Nawawi, Al-Majmu
Whoever hastens departure from মিনা in two days, there is no sin upon him; and whoever delays, there is no sin upon him — for the one who fears Allah.
Al-Baqarah (2:203)