The short answer is no, it doesn't, at least as long as your not also coupling it with something like auto-asphyxiation, which is so dangerous for many other reasons before hair loss.
First the medical term for the harmless hair loss in males is "alopecia" (might help online searches). The most common kind of male hair loss is Androgenic alopecia (AGA), and the most common mechanism for this is buildup of 5α-DHT in the hair follicle (ibid). 5α-DHT comes from testosterone (T) after being modified by an enzyme. It then shortens the amount of time the hair has to grow:
The false argument that masturbation would lead to hair loss then goes something like this:
- Elevated levels of 5α-DHT lead to hair thinning
- 5α-DHT is derived from T
- Masturbation elevates T
- Elevated T leads to elevated 5α-DHT
- Therefore, masturbation leads to hair thinning.
Putting it in more formal logic may be giving to much credit to those proposing the theory, but it let’s address where the critical problems are. The first thing to attack is 3. This was probably not the aim of any study, but is a tangential finding in a few studies. One looked at the T levels of men and self-reported masturbation frequency and found no correlation (they were actually studying sex drive). I couldn’t find an example of study which took males from a base line “fast” of masturbation, recorded T levels, and then had them masterbate, and I don’t really know who would fund such a clinical study (but that would directly answer the question).
So what does effect T levels? Other than non-natural sources like steroids, things like overall fitness, vitamin D levels, and mental state. Also, you don't want to reduce your T levels if you can avoid it, as it is likely providing several positive benefits.
The loss the third statement already puts a hole in the logic, but statements 1 and 4 also pose problems.
It is not the global (systemic) production of 5α-DHT that is the problem. In fact any significant amount of 5α-DHT in the sera is probably a sign of other problems. Rather, it’s the local production of 5α-DHT within the hair follicle that leads to AGA. Further that over production of 5α-DHT is more closely linked to higher levels of the 5α-reductase enzyme that synthesiszes 5α-DHT from T (ibid). In turn the enzyme levels are likely set primarily by genetics, with environmental factors like diet and stress adjusting from your baseline (speculation, looking for a source).