I have been having this problem since I was about 16 years old but I haven't given too much thought to resolving it. It happens on occasion but lately it has been occurring more often.
Basically, after I masturbate, I sometimes get burning pains in my penis. It starts out slowly, about 2-3 minutes after finishing and then it starts burning like hell and I really want to pee. So I pee, but that makes the pain much worse! Basically to fix the problem I have to drink a LOT of water and keep going to the toilet to piss and when I have this pain it makes me wanna go to the bathroom every 5 minutes, even if only a couple of drops of pee come out. By the way, when a little pee comes out it hurts like CRAZY, like razor blades coming out of the tip of my penis. Also, when I take a long, nice pee and I finish my last drops, the pain can sometimes even go up to the bladder, so it feels like it's full of lava, but this pain is there for about 30 seconds-1minute, then fades away.
It doesn't matter if I masturbate 5 times a day or 1, this is really random.
Interestingly, this happens pretty much 99% if I masturbate after drinking alcohol, even 1 beer. This never occurs during sex, BUT, it does sometimes when I drink alcohol, making it very uncomfortable to be near your partner.
I do not have any STIs and I don't think I have any infections. I have had this problem when I was a virgin, so it didn't come after I first had sex.
I have tried wiping away all the cum after finishing, because I thought maybe some remaining cum causes the problem, but It doesn't.
Also, another way I make the pain go away is to just hold my pee in and wait for some time, then I go pee a lot and the pain fades.
I would really like to know the cause, because I am tired of this problem and it is having a negative impact on my sex life.