Both dramas are about power struggle inside the palace. In terms of actors Charmaine Sheh is acting in both of them.
If you like palace/harem dramas set in the Qing dynasty and want an even faster pace storyline, you have to watch War and Beauty. War and Beauty is the predecessor to all harem dramas that have come out in the past 20 years and is also timeless. You also get to see a young Charmaine Sheh in it. I believe her performance in War and Beauty is what led to her being casted in Yanxi Palace.
Gigi Lai and Charmaine Sheh are in both dramas. The plots are not the same at all: War and Beauty is a palace drama while Heaven Sword & Dragon Sabre is wuxia. However, both dramas make you think. There's plenty of mind-manipulation and psychological warfare in both. There's a strong female lead in both dramas, but not necessarily acted by the same actress. Also tragic love, but I won't go into more detail for fear of spoilers! I watched both with my mom as I wouldn't have watched either on my own (they're kinda old and not my typically kind of drama) but they both pleasantly surprised me!