Neither one. (-:
No, seriously: Yes, if you begin a sentence with 'neither,' you must use inversion, as in your first example:
Neither does it have anything to do with B.
However, that is already the second part of the thought, not the first part. You cannot put 'nor' later in the sentence, because 'neither' here already means 'nor.' The complete thought is
It has nothing to do with A. Neither does it have anything to do with B.
(= It has nothing to do with A. Nor does it have anything to do with B.
That is, here 'neither' and 'nor' have the same meaning; you can substitute one for the other, but you can't use both of them together.
If you want to use only one sentence, you don't normally start with a negative conjunction anyway, because you have to make the negative statement first before you can connect it with a second negative statement.
It has nothing to do with either A or B.
It doesn't have anything to do with A, nor does it have anything to do with B.
In modern English, the double construction 'neither ... nor' isn't usually used with clauses, only with nouns. It's possible to find sentences like this in older texts (or ones translated from Romance languages):
Neither has it anything to do with A, nor has it anything to do with B.
(= Neither does it have ..., nor does it have ...
However, that sounds very awkward and old-fashioned; I wouldn't recommend it, and I'm not sure all modern teachers would accept it.
Finally, your other attempt, with no inversion at all, is definitely wrong in standard English:
*Neither it has anything to do with ...
If I recall correctly, you may very occasionally see that non-inverted word order in some BE dialects as a short answer:
A: It doesn't have anything to do with A, does it?
B: Neither it does.
But that's such a rare case that I think you can safely ignore it.