Ambulance officials said the president's heart stopped at his home and he was resuscitated by his bodyguards. He was taken by helicopter to Vienna General Hospital, a government spokesman said.
Klestil suffered a severe bout of pneumonia in 1996, and his lung problems recently again became serious.
He is due to step down from his largely ceremonial role Thursday, having served two six-year terms. The job will go to Heinz Fischer.
Chancellor Wolfgang Schuessel temporarily took over the presidential duties.
Austria's president has wide-ranging powers under the constitution to pick the chancellor, who runs the day-to-day affairs of government, and to dismiss a government he does not like.
However, no Austrian president has ever fired a government and traditionally the chancellor is, in effect, named by the largest party after parliament elections.
Ron Burgundy interviews Peyton Manning on SportsCenter
Florida bear attack: Black bear mauls woman's face