Rage Within the Machine

When a main character is loyally part of a party or division linked to the government, but is beginning to doubt if said party/division is right about their beliefs and policies, or, in extreme, rebels. Often used in dystopian fiction - it's common that at the end the rebel's faith is restored, or they get killed.

Compare to Big Brother Is Employing You, My Country, Right or Wrong, My Master, Right or Wrong, Just Following Orders, and mostly Defector From Decadence.

Not to be confused with Man in the Machine... unless, of course, it's a Cyborg rebelling against those that made him/her/it abduct and robotisize others. Also, not to be confused with Rage Against the Machine. Or this article, from which the title was derived.

Comic Books

 * Happens at at some point to every judge in Judge Dredd. Dredd himself notably lost faith and resigned from his post just before the events of "Necropolis."

Film

 * Schindler's List: Oskar Schindler.
 * Preston from Equilibrium. Unlike many of these, he succeeds in taking down the local tyranny.
 * Sgt. Hugo Stiglitz from Inglourious Basterds. As an enlisted man, he killed 13 Gestapo officers, plus he has the honor of dying while doing what he loved best - stabbing an already dead Nazi in the back of the head with a large knife.
 * John Anderton from Minority Report, who starts to doubt the justice of his mission around the time he gets framed.

Literature

 * Winston Smith in Nineteen Eighty-Four has to be one of the most famous examples who secretly rebels against Big Brother
 * D-503 in Yevgeny Zamyatin's We - but at first he cannot grasp the fact that he feels the urge to rebel...and considers it a sickness.
 * Bernard Marx and Helmholtz Watson from Brave New World. Unlike his fellow citizens, Bernard wishes for more solitude and dislikes taking soma. Helmholtz wants to create True Art.
 * Guy Montag in Fahrenheit 451 is curious about the books he is paid to burn and takes one home.
 * Paul Proteus from Kurt Vonnegut's Player Piano.
 * Equality 7-2521 from Anthem by Ayn Rand.
 * The City Watch in general and Vimes in particular in the Discworld novel Night Watch. Jingo is an arguable case, since they never had any loyalty to Rust, but to the ruler he deposed.
 * Inspector (later Watch Commander) Carmichael of Jo Walton's Alternate History Small Change trilogy has been blackmailed into becoming Da Chief of what is effectively a British gestapo. Although publicly feared and hated, he uses the resources and privileges he now has to his advantage to secretly move as many innocents as he can safely out of the country.

Live-Action TV

 * Juliet from Lost is an example of this...particularly in the episode I Do.
 * Deep Throat of The X-Files fed Mulder information from his position in authority.
 * In Nikita Nikita rebels right away when Division kills her boyfriend. Micheal on the other hand stays loyal even though he had doubts for a long time.
 * He refuses to participate in Percy's private operation and even helps Nikita from time to time. In the end . He remains loyal to the ideas behind Division but hates what Percy is doing as its head.

Mythology and Religion

 * In The Bible, Judas started to doubt Jesus and, in the end, betrayed him, leading to the crucifixion. It is debatable whether it counts, though.
 * According to quite a few religious (and some secular but metaphysically inclined) philosophers this is the default state of humanity: being in opposition to a larger cosmic purpose and instinctively driven to Screw Destiny regardless of the outcome. There is as much disagreement on whether this is a good thing or a bad thing as there is on what said cosmic purpose actually is (or if it's there at all).

Video Games

 * Kyle Katarn of the Dark Forces Saga started out as an Imperial officer and rebelled.
 * Cloud Strife in Final Fantasy VII.
 * Cecil Harvey from Final Fantasy IV doubts the King of Baron's intentions when he's ordered to attack Mysidia and steal their crystal, and finally leaves his service after being unwittingly used to burn the Village of the Mist to the ground.
 * Devil Survivor. Izuna knows that the government is planning to, but will follow through with the plan "for the good of the country". Of course, she'd rather not resort to this option, and as a result, will help the main characters in some of the endings.
 * Deus Ex.

Web Comics

 * Alluded to in The Other's backstory in Girl Genius.
 * In Gunnerkrigg Court, Kat Donlan was raised in the Court and is a very strong supporter of its scientific worldview... until she discovers a conspiracy that the Court's founders pulled off. She loses all respect for the Court's organization and current leadership, even though she remains a firm believer in the power of science.

Western Animation

 * General Crozier and Cardinal Ravenwood from Metalocalypse.