Complex sentence: Beg was part of Humayuns forces when they were forced to retreat from India following the siege by Sher Shah and remained with his leader throughout his exile in Persia.
Split into simpler sentences: Beg was part of the Humayun forces when they retreated from India after the siege by Sher Shah. He remained with his leader throughout his exile in Persia.