Or was it only used outside of Germany or perhaps only in the Anglosphere?
Shorting a name and add an -i to the end is one possible diminutive in German. You can use it to either show affection (like a wife calling her husband Hasi) or to paint someone as dumb and unworthy of respect (if you call your boss Der Hasi behind his back).
The word Nazi is used accordingly: It was originally used to express disdain with or low respect towards members of the nationalsocialist party. It was known from at least 1903, but was only made (more or less) popular in the 1920s in regard to the NSDAP. There are claims it was made famous by Tucholsky in 1923, but I could not verify this. Goebbels tried to take over the term in 1927, but failed and the party afterwards mostly shunned its usage.
As far as I know, the word was not commonly used in Germany during WW II, but that might be due to the danger of writing it down. Exiles fleeing prosecution in Germany exported the word, and after the allied victory it became common in post-war Germany as well.
Arbeitsstelle für Sprachauskunft und Sprachberatung der Universität Vechta (ASSV): Nazi
You can find a paraphrase of the word's origin in the Online Etymology Dictionary page on Nazi.