Dietary, smoking, and drinking habits, as well as sociopsychological factors and familial history, were investigated in a case-control study on the etiology of esophageal cancer (EC) in two areas of Shanxi (Yangcheng and Linfen), north central China. Data were analyzed from 326 cases and 396 controls. We identified several factors associated with high or low risk; some were common across the areas and others were area-specific. Consumption of millet gruel was associated positively with EC, in a dose-response relationship. An increase in EC risk was seen for consumption of millet soup with noodles, and also with certain sociopsychological factors, in both areas. A large increase in risk was found with consumption of boiled vegetables in Linfen, with a dose-response relationship. EC risk tended to become greater with the increasing intake of moldy foods and of pickled vegetable juice. A positive association between EC risk and family history of EC was observed only in Yangcheng. Soybean consumption was found to be associated with reduced risk. Dental hygiene (brushing teeth) was associated with reduced risk in Linfen. There was a suggestion of increased risk associated with heavy tobacco smoking, but it was not significant in either area. Alcohol consumption had a marginally significant association with risk in the high risk area, but not in Linfen.