Complex sentence: Yan's grandfather Yan Zhitui was an official under the Northern Qi, after the fall of Northern Qi, Zhitui became an official of the Northern Zhou, and moved his families to Guanzhong.
Split into simpler sentences: Yan's grandfather Yan Zhitui was an official under the Northern Qi. After the fall of Northern Qi, Zhitui became an official of the Northern Zhou, and moved his family to Guanzhong.