So this was an interesting one for me, because I never seriously tried to consider it. Most online sources that claim this say it's an "old army trick," but after reading several perspectives on wound care in the military, I don't know that is true.
The actual historical roots on this idea I could find actually go back to reference a slave owner using it as a form of abuse to over work his slave, or a short fiction story from 1915.
The problem is one of timing. As wars started to utilize gun powder more, tourniquets were realized to be superior to cauterization (first ideas of tourniquets go back to ~1500's, serious implantation with Jean Petit in early 1700's). By the time we get to something like Vietnam, not only would the solders have had tourniquets, if they were going to cauterize the wound they would have done it chemically.
Another problem is the gas and force released from igniting gun powder. It doesn't just burn hot, it propels. That's why it's useful for moving bullets. I think this would likely further distort the tissue, and if applied in large amounts in to major arteries/veins, a good deal of toxicity problems.
I just honestly think this would cause more harm than good. I'd be very interested if someone can find a documented example of where this was actually tried in the field (and I missed it). Considering you can't readily treat your own neck, the appropriate thing to do would be to apply direct pressure with your hands to the places that are bleeding the most (or if you're the one helping, then the same to the other person's neck).
Oddly enough I have a more detailed SE answer written up in Bio, for those interested in proper wound care in the neck.
Edit:
I was made aware the "Dual Survival" episode where one of the characters cauterizes a wound (YouTube Video Here and then here). You will note that even the survivalist unequivocally rejected this method as valid before he did it to himself (presumably for considerable compensation from Discovery Channel). I reject this as a valid example for the following reasons:
That was a shallow wound where the bleeding was mostly controlled, (from the video you can see that it is hardly bleeding), and as a wound caused by a clean cut, could and should be controlled with pressure and binding.
You can see that the initial load of gun powder did not ignite, some initial cauterization probably occurred by dropping whatever was on fire onto the cut (looked like moss). Further, as mentioned in the video, the gunpowder was mixing with his blood and stinging, a pretty good sign it was being introduced into his blood stream, which could cause toxicity problems.
Because of the shallow nature of this cut, much of the gas released was able to burst out and away from his arm. In a wound actually calling for cauterization, the powder would have had to been placed much deeper. Think of this problem as the difference between igniting black powder on the top of a rock vs packing it into a deep crack. Only one of those leads to an exploding rock.
Further, this brings up the problem of technology again. If they had a knife to heat, and were dead set on cauterization, they should have used the heated knife. No additional benefit of gunpowder would be had, and there are several clear drawbacks. As someone who hunts and hikes often, how many times will you be walking around with black powder (not newer gunpowder formulations) without a good knife? Or for that matter, a belt and cloth and the ability to make a tourniquet (even a make-shift one).
Again, the wound in the video doesn't even call for a tourniquet, to say nothing of cauterization. This is an example of something that makes sensational TV does not make good medical sense, and probably helps spread medical misconceptions and ignorance (as the premise of the show is to help demonstrate survivalist techniques).