Hanks, 57, was promoting his new movie "Captain Phillips" -- about the capture of a US cargo ship by Somali pirates -- when he made the surprise disclosure on CBS television's "Late Night with David Letterman" on Monday.
"I went to the doctor and he said, 'You know those high blood sugar numbers you've been dealing with since you were 36? Well, you've graduated. You've got type 2 diabetes, young man'," the film star said.
Hanks, who won best-actor Oscars for "Philadelphia" in 1994 and "Forrest Gump" in 1995, has often changed his weight for the roles he plays, bulking up for "A League of their Own" in 1992 then shedding the pounds for "Cast Away" in 2000.
Looking fit and healthy, Hanks told Letterman that weight loss at this stage probably wouldn't help.
"My doctor said, 'If you can weigh as much as you weighed in high school you will essentially be completely healthy and will not have Type 2 diabetes' -- and I said, 'Well, I'm gonna have Type 2 diabetes cause there is no way I can weigh as much as I did in high school.'"
The US Centers for Disease Control and Prevention says Type 2 diabetes is "usually associated with older age, obesity and physical inactivity, family history of type 2 diabetes, or a personal history of gestational diabetes."
It can be controlled through healthy food choices, physical activity and weight loss, although insulin or oral medication might also be necessary.
Based on current trends, by 2050, one in three American adults will have diabetes, which in 2007 was the nation's seventh leading cause of death, the Centers for Disease Control said.
