Here's how Code Geass ends.
1. Lelouch invades Britannia and captures the Emperor.
2. Lelouch interrogates the Emperor and finds out everything was just a plot to make him the world's next ruler.
3. Lelouch kills the Emperor, has C.C. dress up as Zero, finds his own clothes and introduces himself to the world as Lelouch vi Britannia, the next ruler of the Britannian throne (even though Britannia is collapsing around those very walls). All of his siblings except Nunally are dead.
4. Lelouch then shoots "Zero", to the shock of the world. C.C. dies for real since that was her objective in getting a contract with Lelouch.
5. He's detained by the Black Knights and taken back to the United States of Japan.
6. He's charged with murdering their president and sentenced to death.
7. Public execution, Suzaku trying to convince the crowd Lelouch = Zero, Kirihara Taizo watching on and thinking, "No one will know the secret of Zero. No one will know your heroism. But know, Lelouch vi Britannia, you were Japan's greatest hero." Lelouch is then executed, Suzaku screams.
8. Cut to the future, Suzaku is now President of the United States of Japan (as per Zero's last will and order) and he still cares for Nunally. Unmarried. Kallen had a child (guess who) and Kaguya has gone on a pilgrimage. Taizo has died, the Black Knights became bureaucrats.
10. Scene change to Zero walking up the Sword of Akasha, his whole family waiting there to see him with open arms.