Complex sentence: In the past, there was a tanuki who was about to die from an arrow wound when he was saved by Taira no Shigemori and to pay his debt of gratitude, he swore to protect the Taira clan.
Split into simpler sentences: In the past, there was a tanuki who was about to die from an arrow wound when he was saved by Taira no Shigemori. To pay his debt of gratitude, he swore to protect the Taira clan.