According to the identity of Prince Yanqing in the book and the identities of Duan and Duan in history, he should be Duan Lianyi, the son of Dali Shangdi, but Shangdi was killed by treacherous court official Yang in history and was childless when he was killed. So Prince Yan Qing does not exist, so there is no so-called ending. But in the novel, his ending is not bad.
In novels and film and television works, Duan Yanqing has been chased by various forces, because he is the prince of the late emperor. The book doesn't say who is chasing him. But it must have something to do with the royal struggle. In the novel, Duan Yanqing's life experience is very bumpy, from a noble prince to speechless, his handsome face is ruined and his legs are gone, but he still strives for self-improvement. Constantly practicing martial arts accomplishments, only to restore royal dignity. Although he didn't achieve anything great in the end, it's incredible that he can still be the leader of the four villains with his perseverance (although it's not a good reputation, it also confirms his martial arts and spiritual strength).
Although there is no Prince Yan Qing in history, Duan, Duan and Duan Yu do have prototypes, but they are different from those described in the novel. Therefore, Mr. Jin wrote "Duan Yanqing" only for more interesting character relationships and character settings. Art is always higher than life and exquisite.