A recent book born of research in the British library gives the following nonsensical explanation:
Nazi - an insult in use long before the rise of Adolf Hitler's party. It was a derogatory term for a backwards peasant - being a shortened version of Ignatius, a common name in Bavaria, the area from which the Nazis emerged. Opponents seized on this and shortened the party's title Nationalsozialistische Deutsche Arbeiterpartei, to the dismissive "Nazi"
I think that explanation shows that you can't always look things up. The author obviously knows little of German pronunciation.
"National" is the same word with the same meaning in both English and German. The difference is in the pronunciation. In German it is pronounced (approximately) as "Nartsiohnahl". But in German the letter "z" is pronounced as "ts". So substituting "z" for "ts" in "Nartsiohnahl" gets us "Nazionahl". And "Nazi" is simply an abbreviation of that. Any nationalist would therefore tend to be called a "Nazi". I suppose an equivalent process in English would be to call any nationalist a "Nasho". But nationalism was never popular in the Anglosphere so that didn't happen. In time, of course, the prominence of Hitler's party made the term specific to members of Hitler's party rather than being applicable to nationalists generally.
For what it's worth, Friedrich Engels (Karl Marx's co-author) was a fervent German nationalist so he could theoretically be termed a Nazi, but I don't know that he ever was described that way.