Hanks, 57, told late night talk show host David Letterman that he had been battling high blood sugar for some time.
"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,'" Hanks said on the CBS network show.
"It's controllable," said Hanks, who was on the show to promote his upcoming film, Captain Phillips. "Something's going to kill us all, Dave," the Oscar-winning actor said, joking with the host.
Type 2 diabetes affects the body by either not producing enough insulin, the hormone that turns sugar into energy, or by resisting insulin.
It is suffered by many Scots and can be life-threatening if not treated.