Inflamed foreskin and penis after masturbation

Hi guys, Does anyone else have a problem that penis gets inflamed after masturbation? It seems it is nothing to do with friction, but the semen. If, I masturbate and do not ejaculate, there will be no problems. However, if I do ejaculate the penis gets really inflamed, itchy and red that lasts 5 to 10 hours. STDs have been checked and all were negative, except herpes. I had my first outbreak four months ago and have had not since.