Despite his profound effect on Persian life and culture and his enduring popularity and influence, few details of his life are known. Accounts of his early life rely upon traditional anecdotes. Early tazkiras (biographical sketches) mentioning Hafez are generally considered unreliable. The preface of his Divān, in which his early life is discussed, was written by an unknown contemporary of Hafez whose name may have been Moḥammad Golandām. Two of the most highly regarded modern editions of Hafez's Divān are compiled by Moḥammad Qazvini and Qāsem Ḡani (495 ghazals) and by Parviz Natil Khanlari (486 ghazals).
Modern scholars generally agree that Hafez was born either in 1315 or 1317; following an account by Jami 1390 is considered the year in which he died. Hafez was supported by patronage from several successive local regimes: Shah Abu Ishaq, who came to power while Hafez was in his teens; Timur Lang (Tamerlane) at the end of his life; and even the strict ruler Shah Mubariz ud-Din Muhammad (Mubariz Muzaffar). Though his work flourished most under the twenty-seven year reign of Jalal ud-Din Shah Shuja (Shah Shuja), it is claimed Hāfez briefly fell out of favor with Shah Shuja for mocking inferior poets (Shah Shuja wrote poetry himself and may have taken the comments personally), forcing Hāfez to flee from Shiraz to Isfahan and Yazd, although no historical evidence of this is available. His mausoleum, Hāfezieh, is located in the Musalla Gardens of Shiraz.