Robert Benmosche, 70, said in an interview with Bloomberg that doctors told him in May he had between nine and 12 months to live.
That sped up his plans, set earlier in the spring, to retire at the end of this year, when a new CEO would be installed and make structural changes at the insurance firm.
"I said, 'You know what? I'm not going to play the odds and I think the changes have to be made now, not later, and so let's accelerate my retirement,'" he said. "And the board was happy to do that."
AIG (AIG) announced in June that Peter Hancock, who has led its property casualty unit, will take over on September 1, with Benmosche in a consulting role.
Benmosche emerged from retirement in 2009 to lead AIG through the fallout from the financial crisis. The firm had to take a massive $182 billion government rescue, which it has repaid plus a $23 billion profit.
In the interview, Benmosche said an experimental treatment set back his battle with the undisclosed type of cancer.
"They say I'm stable," he said, "which is a big word because it wasn't stable for the last six months."
"We'll know in another month or two if we're making progress or not," he said.