OBJECTIVE To investigate the relation between alcohol consumption and heart disease by using differences in county level alcohol sales laws as a natural experiment. DESIGN Observational cohort study using differences in alcohol sales laws. SETTING Hospital based healthcare encounters in Texas, USA. POPULATION 1 106 968 patients aged 21 or older who were residents of "wet" (no alcohol restrictions) and "dry" (complete prohibition of alcohol sales) counties and admitted to hospital between 2005 and 2010, identified using the Texas Inpatient Research Data File. OUTCOME MEASURES Prevalent and incident alcohol misuse and alcoholic liver disease were used for validation analyses. The main cardiovascular outcomes were atrial fibrillation, acute myocardial infarction, and congestive heart failure. RESULTS Residents of wet counties had a greater prevalence and incidence of alcohol misuse and alcoholic liver disease. After multivariable adjustment, wet county residents had a greater prevalence (odds ratio 1.05, 95% confidence interval 1.01 to 1.09; P=0.007) and incidence (hazard ratio 1.07, 1.01 to 1.13; P=0.014) of atrial fibrillation, a lower prevalence (odds ratio 0.83, 0.79 to 0.87; P<0.001) and incidence (hazard ratio 0.91, 0.87 to 0.99; P=0.019) of myocardial infarction, and a lower prevalence (odds ratio 0.87, 0.84 to 0.90; P<0.001) of congestive heart failure. Conversion of counties from dry to wet resulted in statistically significantly higher rates of alcohol misuse, alcoholic liver disease, atrial fibrillation, and congestive heart failure, with no detectable difference in myocardial infarction. CONCLUSIONS Greater access to alcohol was associated with more atrial fibrillation and less myocardial infarction and congestive heart failure, although an increased risk of congestive heart failure was seen shortly after alcohol sales were liberalized.