In the autumn of 851, in a small government compound in Zizhou, in the hills of Sichuan, it rained at night until the pond rose to the edge of the steps.
A man of about forty sat inside with a lamp and wrote to someone far away. He had left the capital six months earlier and travelled more than a thousand li of mountain road to serve on the staff of a regional commander.
He wrote the first line: you ask when I will come back, and I cannot say.
Then the second: the night rain in the Ba mountains is filling the autumn pond.
Outside, that was exactly the weather.
The letter, or the poem, may never have been sent. It may have been sent to someone who was no longer there.
His wife, whose family name was Wang, had died earlier that year, in spring or early summer. He went to Sichuan after her death.
Whether this poem was written for his wife or for a friend has been argued over for eleven hundred years by people with good reasons on both sides.
One thing is not in doubt. From that year on, there was nobody alive in his poems waiting for him to come home.
The Boy Who Copied Books
Li Shangyin, whose courtesy name was Yishan and whose pen names were Yuxi and Fannan, came from a family of minor officials. His great grandfather, grandfather and father had all held posts: a county magistrate here, a county deputy there, a clerk on a provincial staff. It was respectable and it was thin. The only road out was the examination system.
When he was about three, his father took a post on the staff of an official in Zhejiang, and the family went with him.
At nine, the father died in office.
The eldest son, nine years old, brought his mother and his younger brothers and sisters home, escorting the coffin from the south back to Xingyang in Henan. There was no money. Even the burial was arranged with help from relatives.
Years later he described it in eight characters: no place under heaven to return to, no kin to lean on.
For food he copied documents for other people and pounded grain for hire. Both jobs are recorded in the standard biography.
Copying was not wasted time for a clever boy. He copied a great deal, saw a great deal, and his handwriting became good. His prose in the parallel style was later considered the finest of the late Tang. It began in those sheets of paper that belonged to other people.
A cousin of his father knew the classics and the study of characters, and taught him for a few years. By sixteen he was writing prose that people passed around.
At nineteen he met the man who changed his life.
The Gate of the Linghu Family
In 829, Linghu Chu, military governor of Tianping, read something the boy had written.
Linghu Chu was the best writer of official prose of his generation and a veteran of the court. He made a decision: bring the nineteen year old onto his staff, have him study alongside his own son Linghu Tao, and teach him personally the parallel prose used in government documents.
That skill was the key to a career. A man who could draft an edict could hold office.
Linghu Chu also gave him money every year for travelling expenses and for the examinations in the capital.
This was not ordinary patronage. It was a man with no family name being pulled inside the gate of a powerful household.
Li followed him from Yunzhou to Taiyuan, on and off, for about seven or eight years.
The examination road was slow.
The Song may be famous for its examinations, but the Tang version was narrower. Thirty or so men passed the highest degree in a year and more than a thousand sat for it. The written paper was only half of it. The other half was who spoke for you beforehand. The examiner was watching reputations, and reputations were made by patrons.
He had no such backing. He sat the examination repeatedly and failed.
In 837, at twenty six, he passed.
The man who helped was Linghu Tao, now an official, who had spoken to the examiner. Li never pretended otherwise.
That winter, Linghu Chu fell ill.
Li hurried back and stayed by the bed. When the old man wanted to send a final memorial to the throne, Li wrote it for him.
In the twelfth month, Linghu Chu died.
A man had fed and taught and introduced him for eight years, and died just as the degree arrived, before the first appointment.
At twenty six, Li Shangyin had no patron.
A Marriage
In the spring of 838 he sat a second examination, the one that turned a degree into an office. He passed the first round.
In review, his name was struck out.
The men who struck it were in the central secretariat. Why they did it is preserved in two characters: unfit.
There was talk at the time about the reason. The previous year he had married.
His wife was a daughter of Wang Maoyuan, military governor of Jingyuan.
The difficulty was Wang Maoyuan.
Late Tang politics ran on two factions, one gathered around Niu Sengru and one around Li Deyu, and they fought for forty years. Linghu Chu and his son belonged to the Niu side. Wang Maoyuan was close to Li Deyu and counted on the Li side.
The quarrel began over something small. In 808, in a special examination, Niu Sengru and Li Zongmin wrote policy answers that criticised the government. The examiners ranked them at the top. The chancellor Li Jifu took this as a personal attack, wept before the emperor, and had the examiners demoted. The two candidates were left in place for years. One grudge lasted forty years.
By the time of Li Shangyin the two sides were no longer arguing about policy. They were arguing about who got the jobs. Which side a man belonged to was decided by the family of his wife, the name of his teacher, and whose documents he had written.
So here was a young man from a Niu household who, within months of his patron dying, married the daughter of a Li general.
How did the Niu men see it? Ingratitude.
What did Li think he was doing? Probably nothing political. A man of twenty six with no family behind him had been noticed by a military governor who offered him a daughter and a post. It was the best thing that had ever happened to him.
He wrote later that his marriage was a matter of friendship, not of faction.
Faction did not care what he thought.
From that year his career had a pattern. Every time he climbed, someone pushed him down.
He was appointed to the imperial library, and quickly moved out to be a county deputy in Hongnong, a job that meant policing and tax collection and had nothing to do with his abilities.

In Hongnong he reduced the sentence of a man condemned to death, was reprimanded by his superior, and took extended leave in disgust.
Later he passed another examination and returned to the library at a rank lower than the one he had held before.
Then his mother died, and he went home for three years of mourning.
When the mourning ended, the emperor had changed, the Li faction had fallen, and the Niu men were in charge. He belonged to neither side and was trusted by neither.
A man in his thirties lost the best years of his life one year at a time.
Rain in the Ba Mountains
In 847 he followed Zheng Ya, a commissioner who had been demoted, to Guilin.
Guilin was the edge of the world then. The journey took months. He went because there was nothing else.
Staff posts in the Tang were filled by the governor himself and were not part of the regular civil service. A staff member might still be a commoner on paper, or hold an empty honorary title. The pay was decent and the work travelled with the patron. When the patron fell, the job ended.
Li worked in six or seven of these establishments: Yunzhou, Taiyuan, Yanzhou, Jingzhou, Guilin, Xuzhou, Zizhou. Each move had the same cause.
Within a year Zheng Ya was demoted again. Li was out of work and went back to the capital.
In 849 he was given a county deputy post at Zhouzhi. Ten years earlier he had been a county deputy at Hongnong. Ten years later it was the same job in a different county.
That autumn the governor of Xuzhou invited him to join his staff. The man valued him. It was the last real chance.
A year later the governor died.
In 851 his wife died.
That autumn the military commissioner of the eastern Sichuan circuit asked him to come west. He left his children with relatives and went into the mountains alone.
The four years at Zizhou were the steadiest of his life and the emptiest.
He wrote documents for the office. He wrote poems for banquets. He wrote epitaphs for other families. He read Buddhist texts, spent time with the monks, and gave money to print sutras. For a while he thought about taking vows.
The biography says it plainly. In the east of Sichuan he was usually unhappy, bowed before the Buddha, and even considered becoming a monk.
Liu Zhongying, his employer, did not let him. Liu was decent to him and, when he was recalled to the capital, arranged a post for him in the salt monopoly. The rank was low and the pay was better.
He held it for two or three years.
During the Zizhou years he collected his own official prose into a volume and wrote a preface for it. In that preface he says that in three years his household had collapsed, that he was seldom cheerful, and that he had begun to apply himself to Buddhist practice, willing to ring the bell and sweep the floor as a wanderer on a cool mountain.
A man who had written documents for governments for decades wanted, at the end, to sweep a floor.
Look again at the poem from that first night. It is twenty eight characters long.
The first line is now. The second line is now. The third line jumps into a future that has not happened: some day, by the west window, cutting the wick of the lamp, I will tell you about the rain in the Ba mountains tonight. The fourth line comes back to now.
The rain in the Ba mountains appears twice in one short poem. Once as the rain that is falling, and once as the rain that will be remembered.
A man sits in one room and lives the same rainy night twice.
In 858 he was dismissed and went home to Zhengzhou.
That winter he died there, about forty six years old.
Fifty Strings
He left six hundred poems.
That is not many for a Tang poet. Li Bai has over nine hundred, Du Fu over fourteen hundred. But half of the six hundred poems of Li Shangyin have no title at all.
After his death they were gathered into a collection in three scrolls. Commentators worked on it dynasty after dynasty. In the eighteenth century Feng Hao produced an annotated edition that tried to date every poem, name the person it was sent to, and explain the occasion.
When he had finished, many of them still could not be explained.
They are called simply Untitled.
The device existed before him and almost nobody dared to use it after. Untitled does not mean the poet forgot the title. It means the title could not be written down.
Meeting is hard, and parting is hard too; the east wind is weak and every flower falls.
The silkworm keeps spinning until it dies, and only then is the thread used up. The candle turns to ash before the tears dry.
For eleven hundred years readers have taken those lines and applied them to love, to careers, to everything that cannot be said out loud.
At the front of his collection stands a poem called The Ornamented Zither.
The zither, he says, has fifty strings for no reason, and every string and every bridge recalls a year of youth.
Here is the detail.
The ancient zither did have fifty strings. In the oldest legends, a goddess played a fifty string zither before the supreme deity, and the sound was so sorrowful that he could not bear it. He ordered the instrument broken and rebuilt with twenty five strings.
So from the Han dynasty onward, the zither had twenty five.
He wrote fifty.
A man describing his own grief doubled the strings.
The last lines of that poem say: this feeling might have waited and become a memory. But even then, in that moment, I was already lost.
He is buried at Xingyang.
The grave is still there, and it is small. The railway runs close by, and when a train goes past, the ground shakes very slightly.