The term was coined by Antony Flew, who gave an example of a Scotsman who sees a newspaper article about a series of sex crimes taking place in Brighton, and responds that "no Scotsman would do such a thing."
When later confronted with evidence of another Scotsman doing even worse acts, his response is that "no true Scotsman would do such a thing," thus disavowing membership in the group "Scotsman" to the criminal on the basis that the commission of the crime is evidence for not being a Scotsman.
However, this reasoning is fallacious, as there exists no premise in the definition of "Scotsman" which makes such acts impossible (or even unlikely). The term "No True Scotsman" has since expanded to refer to anyone who attempts to disown or distance themselves from wayward members of a group by excluding them from it.
The issue with this, that which makes it a fallacy is because there is NO premise in the DEFINITION of a scotsman that makes certain acts impossible.
In other words, if, by definition, a TRUE scotsman would never wear a kilt below his knees then anyone wearing a kilt below his knees would NOT be a TRUE scotsman.
Exceptions to its use
Noteworthy is that the fallacy does not occur if there is a clear and well understood definition of what membership in a group requires, and it is that definition which is broken (e.g., "no honest man would lie" or "no theist can be an atheist" and so on). Thus, the NTS fallacy only occurs when the group is later redefined for no valid reason.
It is also important to understand that the NTS places no restrictions on whether a definition is sensible or not; it only concerns if a definition is applied consistently or not.
Now, when this comes to religion things tend to get a bit more complicated BUT only if there is no defined description of what it means to be "A" OR the doctrine of those following "A".
EX: A christian is a person that follows Christ.
That is ONE definition of a Christian.
So, any person that follows Christ is a Christian REGARDLESS of how the behave IF the ONLY definition of being a Christian is being a follower of Christ.
Based on the above definition ALONE, the "non true christian" comment would be a fallacy like the no true scotsman one.
The problem is, of course, that Christianity DOES have established defining characteristics BEYOND just believing in Christ.
We can use the "no true catholic" argument and it NOT be a fallacy because the RCC has a established set of rule and doctrines that define a catholic and an example would be someone that does not believe in the Trinity would NOT be atruc Catholic since to be a true catholic as defined BY the Catholic doctrine one must believe in the Trinity.
Point being that the "no true scotsman" fallacy is ONLY valid when there isn't a definition of a true "anything".