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.
Members of Congress to keep receiving porn magazine
Rosie O'Donnell unveils nearly 50-pound weight loss