The untyped dnd-3.5e feat Heretic of the Faith (Power of Faerûn 46-7), among other effects, allows a cleric's "alignment [to] be two steps away from [the cleric's] respective deity’s alignment instead of just one" as is typically required of a cleric. (See Cleric on Alignment on Player's Handbook 30 and 31 for details.)
For example, the feat allows a cleric of the LE Faerûnian god Bane to be not only LE, LN, or NE but also either LG or CE. (As Bane himself isn't true neutral, a cleric of Bane still can't be only neutral in alignment.)
The feat Heretic of the Faith, however, comes with a lot of baggage. For example, the feat mandates following a particular heresy (and this is not typically a heresy developed by the PC!), and the feat typically leaves the heretic's soul forever damned unless the heresy is later deemed acceptable by the church faithful and the deity (a situation the text refers to as "vanishingly rare"). O, and, of course, most members of the heretic's traditional church despise the heretic and religious followers that had already been gained from the feat Leadership (PH 97) may leave the heretic when the feat's gained.
Several heresies are described in Power of Faerûn, and the Dragon #355 Volo’s Guide column “Demon Cults of the Realms” describes the Harlot’s Coin Heresy, a heresy of Waukeen.
No guidelines are provided for adjudicating this feat's effects in a setting other than the Forgotten Realms. Sadly, this makes it difficult to evaluate the feat's interaction with likely the most popular fan-created heresy, the Burning Hate heresy of the World of Greyhawk god Pelor.
Note: Also worth mentioning also is the Complete Scoundrel prestige class gray guard (40-5), which at level 1 gains the class feature sacrament of trust that allows others that cast on the gray guard the spell atonement to do so at reduced cost. At level 10 the gray guard gains the class feature sacrament of the true faith, allowing a gray guard to violate his code of conduct without risking losing his paladin special abilities unless such violations are egregious or pervasive. However, a paladin/gray guard must still remain lawful good.