are you running or exercising naked? there are penile conditions that can cause this reaction but you would need to see a urologist to be properly examined. penile retraction can occur because of a ample fat pad in this area or weaker connective tissue. exactly why your penis is deciding to hide during exercise is really a mystery until you see a urologist. since this is causing your pain when you pull your penis back out from it's temporary hidden position i strongly advise you to get it properly examined.
why does the penis retract while running. my penis retracts significantly while running or performing strenuous cardio. my penis does return to its original state after either pulling it back out with much pain or allowing it to relax and return to its original state 4-5 minutes.