The novel circulated in handwritten copies with various titles until its printing in 1791. While the first 80 chapters were written by Cao Xueqin, Gao E, who prepared the first and second editions printed with his partner Cheng Weiyuan in 1791-92, added 40 chapters to romance.
It is believed that the content of the story is semi-autobiographical describing the fate of the writer's own family and, by extension, the Qing dynasty. As the author details in the introduction to the first chapter, the book is intended to be a memorial to the girls he met in his youth, friends, family, and servants. The novel is memorable not only for its huge cast of characters (mostly female) and psychological scope, but also for its precise and detailed observation of the life and social structures typical of the Chinese aristocracy of the eighteenth century.
Because of literary inquisition prevalent in China's dynasties Ming and Qing, the book was first published anonymously and only later attributed to his own.