My theory is that he asked by Emma to help those who were hunting down the Lords of Cinder. He chose to do this, feeling that his duty to his kingdom was greater than his duty to the princes (which put him at odds with Kamui). He came to help with two of the most essential fights in the Unkindled's journey, and, upon watching their defeat of the resurrected Lords of Cinder from the shadows, Gotthard went back to Lothric Castle to unlock the Grand Archives. However, in the time that he had been gone, the Pilgrim Butterflies appeared, and animated the Dragonslayer Armor. He managed to get past it, but he expired shortly afterwards.