Question: why was rukia going to be executed?
Answer: Rukia's Execution is an event taking place during the Ryoka Invasion, consisting of Rukia Kuchiki facing execution with the Sōkyoku for the crime of transferring her Shinigami powers to Ichigo Kurosaki.