The TV series is based on a novel that provides a detailed, episodic record of the two branches of the Jia clan — the Rongguo House and the Ningguo House — who reside in two large, adjacent family compounds in the capital. Their ancestors were made dukes, and as the novel begins the two houses are among the most illustrious families in the capital.
The main character, Jia Baoyu (whose name means "precious jade"), is the adolescent heir of the family, a reincarnation of the Divine Attendant-in-Waiting. The Crimson Pearl Fairy is incarnated as Baoyu's sickly cousin, the emotional Lin Daiyu, who loves Baoyu. Baoyu, however, is predestined in this life to marry another cousin, Xue Baochai. This love triangle against the backdrop of the family's declining fortunes forms the most well-known plot line in the novel.