This is definitely
"My MC is the worlds best terrorist"
The main character is Lelouch Lamperouge, self-appointed leader of a terrorist movement opposing the Britannia Empire's occupation of Japan
"His friends are his sidekicks and his worst nightmare"
Lelouch's best friend, Suzaku Kururugi, works for the Britannian military, opposing the terrorists in his advanced Knightmare Frame mecha. Another of his schoolfriends, Kallen Stadtfeld, is a prominent member of the resistance.
"His hobbies are ripping off royals"
The members of the Britannian royalty are the main villains of the series.
"and controlling people"
Lelouch has the power of Geass, which allows him to give someone a single vocal command that they are compelled to obey.
"But in the end he's a real good guy"
He's the protagonist... though tbh I wouldn't say he's a "good guy". He does some pretty terrible things in the name of opposing the Britannian regime.
Hint (note, this actually does spoil the anime):
Season 1 ends with Lelouch and Suzaku holding each other at gunpoint. We hear a gunshot... cue end credits. I never actually watched Season 2, but from what I've heard it has a completely different storyline to Season 1.