Scientists analysed genealogy records of members of the Korean imperial court dating from 1392 to 1910.
The records were kept as proof that people belonged to the noble class.
They included information about eunuchs, who either lost their reproductive organs in accidents or underwent castration to gain early access to the palace.
The noble Korean eunuchs lived 14 to 19 years longer than men of similar social class who were "intact".
Among 81 eunuchs studied, three lived to 100 or more. The average eunuch lifespan was 70 years, compared with 56 to 60 for non-eunuch men in the court.
The finding suggests male sex hormones, produced in the testes, may be responsible for shortening men's lives.
In the UK, men today live an average of 78 years and women 82, though the gap is narrowing.
"This discovery adds an important clue for understanding why there is a difference in the expected lifespan between men and women," said lead scientist Dr Kyung-Jin Min, from Inha University in Korea.
The research is reported in the journal Current Biology.
The scientists discounted the theory that palace life contributed to the eunuchs' long lives.