Complex sentence: He helps Shekharan to prove his innocence for which he had to confess his crimes and surrender infront of the law.
Split into simpler sentences: He helps Shekharan to prove his innocence. For this, he had to confess his crimes and surrender infront of the law.