Cross-sectional studies of the associations of alcohol and tobacco use with cognitive function do not take into account behavior change after memory loss or differential survival. This prospective study examines the association of cigarette smoking and alcohol consumption at baseline with risk of poor cognitive function 13-18 years later. Between 1973 and 1975, 1469 relatively well-educated, noninstitutionalized men and women from Rancho Bernardo, California, answered standardized questions about smoking and alcohol consumption. Between 1988 and 1991, 511 of these men and women completed five standardized cognitive function tests. At baseline, 20.4% of the men and 23.0% of the women were cigarette smokers. Smoking was associated with increased mortality in men but not in women. In surviving male participants, cognitive function test scores did not significantly differ by baseline smoking status. Among female participants, smoking was associated with categorically defined poorer function on two of five tests. At baseline, 16% of the men and 29% of the women were nondrinkers. Drinking more than two drinks per day was associated with decreased mortality in both sexes. Among women, increasing consumption of alcohol predicted a significant decline in the long-term recall and savings scores of the visual reproduction test. Moderate drinking, approximately two drinks per day, predicted categorically defined poor performance on the Buschke long-term recall task in women. Alcohol consumption was not associated with cognitive function in men. Overall, the observed associations were weak, and no clear pattern was observed. Although there were some gender differences in observed associations and a survivor effect cannot be excluded, data from these healthy, educated, noninstitutionalized people offer no compelling evidence that social drinking or cigarette smoking causes or prevents impaired cognitive function in old age. The large number of comparisons and inconsistent results suggest that the few statistically significant findings may be spurious. Additional long-term prospective studies are needed to determine the generalizability of these findings to individuals in less healthy or less well-educated cohorts.