Doing ghusl on Eid is mustahabb.
It was narrated that the Prophet (peace and blessings of Allaah be upon him) did ghusl on the day of Eid.
It was also narrated that some of the Sahaabah did ghusl on the day of Eid, such as ‘Ali ibn Abi Taalib, Salamah ibn al-Akwa’ and Ibn ‘Umar (may Allaah be pleased with them).
Al-Nawawi said in al-Majmoo’:
All the isnaads (of these reports) are weak and false except the report of Ibn ‘Umar. The evidence which may be taken as proof that it is mustahabb is the report of Ibn ‘Umar, and analogy with Jumu’ah.
Ibn al-Qayyim said:
There are two weak (da’eef) ahaadeeth concerning this matter, but it was proven from Ibn ‘Umar, who was very keen to follow the Sunnah, that he used to do ghusl for Eid before going out.
With regard to the time when one should do ghusl for Eid:
It is better to do that after Fajr prayer, but if one does it before Fajr that is sufficient, because of the shortness of time available after Fajr, because the people need to go to offer the Eid prayer and the prayer place may be far away.
It says in al-Muntaqa Sharh Muwatta’ al-Imaam Maalik:
It is mustahabb to do ghusl just before going out to the prayer-place. Ibn Habeeb said that the best time to do ghusl for Eid is after praying Fajr. Maalik said in al-Mukhtasar that if one does ghusl for Eid before Fajr that is acceptable.
In Sharh Mukhtasar (2/102), Khaleel said that the time for ghusl for Eid is during the last one-sixth of the night.
Ibn Qudaamah said in al-Mughni:
The time for ghusl (for Eid) is after the dawn comes, according to the apparent meaning of al-Khiraqi’s words. Al-Qaadi and al-Aamidi said: Ghusl before Fajr does not fulfil the Sunnah of doing ghusl, because the ghusl for a prayer should be done on that day and doing it before dawn does not meet that condition, as is the case with ghusl for Jumu’ah. Ibn ‘Aqeel said: What is mentioned in the texts from Ahmad is (that it may be done) before Fajr and after, because the time for Eid is more limited than the time for Jumu’ah, so if it is limited to the time after Fajr one may not be able to do it. And because the purpose behind it is to cleanse oneself, which may be achieved by doing ghusl at night because it is close to the time of prayer. But it is better to do it after Fajr, so as to avoid an area of scholarly dispute and to be more clean, because that is closer to the time of prayer.
Al-Nawawi said in al-Majmoo’:
Concerning the time when this ghusl is valid, there are two well-known opinions. The view that it should be after dawn breaks was stated in al-Umm and the more correct view according to scholarly consensus is that it is permissible to do it both after Fajr and before.
Al-Qaadi Abu al-Tayyib said in his book al-Mujarrad, al-Shaafa’i stated in al-Buwayti that ghusl for Eid is valid before dawn breaks.
Al-Nawawi said: If we say that according to the more correct view it is valid before dawn, then the most sound and most well-known view is that it is valid after half the night has passed, but it is not valid before then. The second view is that it is valid at any time of the night. This was the view of al-Ghazaali, and was the view favoured by Ibn al-Sabbaagh and others. The third view is that it is only valid just before Fajr. This was the view of al-Baghawi.
Based on this, there is nothing wrong with doing ghusl for Eid before Fajr prayer if that will make it easier to go out to the Eid prayer.
And Allaah knows best.