It's normal for the testicles to draw up slightly before ejaculation — that's a standard part of the reflex. What isn't typical is for one to travel far enough to leave the scrotum and appear to sit up in the groin.
That pattern is sometimes described as a retractable testicle. It's worth knowing about because it has been associated with reduced fertility and a higher risk of testicular cancer in some men.
There's no need to panic, but this is worth mentioning to a doctor rather than guessing about. A physician can examine you properly, answer questions about your specific situation, and tell you whether anything needs monitoring.