Complex sentence: Mallory resigned after the Confederate government had fled from Richmond at the end of the war, and he and several of his colleagues in the cabinet were imprisoned and charged with treason.
Split into simpler sentences: Mallory resigned after the Confederate government had fled from Richmond at the end of the war. Following the final collapse of the Confederacy, he and several of his colleagues in the cabinet were imprisoned and charged with treason.