Which is correct:
1-When my wife comes home from work, my dog always barks. But she just walked in and I do not know why it is not barking.
2-When my wife comes home from work, my dog always barks. But she just walked in and I do not know why it does not bark.
As a side note, most Americans would expect you to use "he" or "she" for your pet dog, not "it."
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.