He passed away in Mosul, and a domed shrine was built over his grave. Al-Ṣūlī relates that the vizier Muḥammad ibn ʿAbd al-Malik ibn al-Zattāt composed the following elegy for him 1:
A message arrived—of the weightiest kind of news;
when it descended, it shook the very core of hearts.
They said, “Ḥabīb lies interred.” I answered them:
“I implore you—do not call him merely al-Ṭāʾī.”
Another poet said 2:
Verse was bereaved of the signet-ring of poets,
of the stream that watered its garden—Ḥabīb al-Ṭāʾī.
The two died together and now lie side by side in one grave,
just as they had been together before among the living.
Al-Ṣūlī collected Abū Tammām’s poetry according to the letters of the alphabet. Qāḍī Ibn Khallikān 3 reports: “He praised Aḥmad ibn al-Muʿtaṣim—though some say it was al-Maʾmūn—with the ode that begins:
Courage like ʿAmr’s, generosity like Ḥātim’s,
forbearance like Aḥnaf’s, acuity like Iyās’s.
One of those present 4 objected, ‘Do you recite this before the emir when his rank is higher than that of the men you mention 5?’ Abū Tammām lowered his head for a moment and then improvised:
Do not rebuke me for likening one so exalted
to men beneath him—a roaming metaphor in bounty and might;
for Allah has set forth, for His Light,
the likeness of a niche and a lamp.
When they later examined the written copy of the ode, they found that these two verses were absent; he had composed them extemporaneously. Someone remarked, “After this, he will not live long,” and so it was.
Qāḍī Ibn Khallikān 6 adds: “Some have claimed that he presented this ode to one of the caliphs, who thereupon granted him Mosul as a fief so that he dwelt there forty days. This report is unfounded and baseless, though certain people—such as al-Zamakhsharī and others—have taken it up with enthusiasm.”