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)