Li Bai's birthplace is Chu, Kazakhstan. Another candidate is Suiye in Central Asia (near modern-day Tokmok, Kyrgyzstan). However his family had originally dwelt in what is now southeastern Gansu , and later moved to Jiangyou, near modern Chengdu in Sichuan province, when he was five years old. At the age of ten, his formal education started. Among various schools of classical Chinese philosophies, Taoism was the deepest influence, as demonstrated by his compositions. In 720, he was interviewed by Governor Su Ting, who considered him a genius. Though he expressed the wish to become an official, he could not be bothered to sit for the Chinese civil service examination. Perhaps he considered taking the examination below his dignity. Instead, beginning at age twenty-five, he travelled around China, enjoying liquor and leading a carefree life: very much contrary to the prevailing ideas of a proper Confucian gentleman. His personality fascinated the aristocrats and common people alike, and he was introduced to the Emperor Xuanzong around 742.
In 725, when he was twenty-five years old, Li Bai sailed down the Yangtze River all the way to Weiyang (Yangzhou) and Jinling (Nanjing). During the first year of his trip, he met celebrities and gave away much of his wealth to needy friends. He then turned back to central southern China, met Xu Yushi, the retired prime minister, married his daughter, and settled down in Anlu, Hubei.
In 730, Li Bai stayed in the Zhongnan Mountain near the capital Chang'an (Xi'an), and tried but failed to secure a position. He sailed down the Yellow River, stopped by Luoyang, and visited Taiyuan before going home.
In 740, he moved to Shangdong. In 742, he traveled to Zhejiang and befriended a Taoist priest. The same year, he traveled with his friend to the capital. Poet He Zhizhang called Li Bai "the god dismissed from the Heaven" after their initial meeting, and thus the epithet of "the Poem-God". Consequently, he was interviewed by the emperor (Li Longji, but commonly known by his posthumous title Xuanzong), who personally prepared soup for him, and gave him a post at the Hanlin Academy, which served to provide scholarly expertise and poetry for the Emperor. When the emperor ordered Li Bai to the palace, he was drunk, but he improvised on the spot and produced fascinating love poems alluding to the romance between the emperor and Yang Guifei, the favorite concubine. Once, Li Bai was drunk and asked Gao Lishi, the most powerful eunuch in the palace, to take off his boots in front of the emperor. Gao was offended and managed to persuade Yang Guifei to stop the emperor from naming Li Bai for a prominent position. Li Bai gave up hope thereafter and resigned from the academy.
Thereafter he wandered throughout China for the rest of his life. He met Du Fu in the autumn of 744, and again the following year. These were the only occasions on which they met, but the friendship remained particularly important for the starstruck Du Fu (a dozen of his poems to or about Li Bai survive, compared to only one by Li Bai to Du Fu). At the time of the An Lushan Rebellion he became involved in a subsidiary revolt against the Emperor, although the extent to which this was voluntary is unclear. The failure of the rebellion resulted in his exile to Yelang. He was pardoned before the exile journey was complete.
Finally, Daizong named Li Bai the Registrar of the Left Commandant's office in 762. When the imperial edict arrived in Dangtu, Anhui, Li Bai was already dead. According to legend, he was drowned attempting to embrace the moon's reflection in a river. In reality, Li Bai committed suicide as evidenced by his farewell poem.
Amongst the flowers I
am alone with my pot of wine
drinking by myself; then lifting
my cup I asked the moon
All the birds have flown up and gone;
A lonely cloud floats leisurely by.
The moon shimmers in green water.
White herons fly through the moonlight.
The young man hears a girl gathering water-chestnuts:
I take my wine jug out among the flowers
to drink alone, without friends.
I raise my cup to entice the moon.