Adherence to drugs and healthy lifestyles is low after acute coronary syndrome. We assessed whether trained community health workers could improve adherence to drugs, lifestyle changes, and clinical risk markers in patients with acute coronary syndrome in India. In this study done at 14 hospitals in India we randomly assigned (1:1) patients with acute coronary syndrome 1 or 2 days before discharge from hospital to a community health worker-based intervention group or a standard care group. Patients were randomly assigned with a telephone randomisation service. In the intervention group, during four in-hospital and two home visits, community health workers used unstructured discussions, visual methods, and patient diaries to educate patients on healthy lifestyle and drugs, and measures to enhance adherence. The primary outcome was adherence to proven secondary prevention drugs (antiplatelet drugs, β blockers, angiotensin-converting enzyme inhibitors or angiotensin receptor blockers, and statins) estimated using a Composite Medication Adherence Scale at 1 year. The secondary outcomes were difference in lifestyle factors (diet, exercise, and tobacco and alcohol use), and clinical risk markers (blood pressure, bodyweight, BMI, heart rate, and lipids). All analyses were by intention to treat. This trial is registered with the Clinical Trial Registry of India, number REF/2013/03/004737, and ClinicalTrials.gov, number NCT01207700. Between Aug 23, 2011, and June 25, 2012, 806 participants were randomly assigned (405 to a community health worker-based intervention group and 401 to a standard care group). At 1 year, 40 patients had died and 15 had discontinued or been lost to follow-up, so 750 (93%) were included in the analyses (375 in each group). Secondary prevention drugs prescribed at discharge were 98% (786/803) for any antiplatelet drug, 79% (638/803) for dual antiplatelet drugs, 69% (555/803) for β blockers, 69% (552/803) for angiotensin-converting enzyme inhibitors and angiotensin receptor blockers, and 95% (762/803) for statins. At one year, overall adherence (≥80%) to prescribed evidence-based drugs was higher in the intervention group than in the control group (97% vs 92%, odds ratio [OR] 2·62, 95% CI 1·32-5·19; p=0·006). For individual drugs, we recorded significant differences for angiotensin-converting enzyme inhibitors and angiotensin receptor blockers (97% [233/240] in the intervention group vs 93% [223/240] in the control group; p=0·036) and statins (97% [346/356] vs 93% [321/345]; p=0·011). The intervention group had significantly greater adherence to smoking cessation (85% [110/129] vs 52% [71/138], OR 5·46, 95% CI 3·03-9·86; p<0·0001), regular physical activity (89% [333/375] vs 60% [226/375], OR 5·23, 95% CI 3·57-7·66; p<0·0001), and healthy diet (score 5·0 vs 3·0, OR 2·47, 95% CI 1·88-3·25; p<0·0001). More patients in the intervention group had stopped alcohol use at 1 year (87% [64/74] vs 46% [46/67], OR 2·92, 95% CI 1·26-6·79; p =0·010). At 1 year, the mean systolic blood pressure (124·4 mm Hg [SD 13·5] vs 128·0 mm Hg [15·9]; p=0·002), weight (65·0 kg [11·0] vs 66·5 kg [11·5]; p<0·0001), cholesterol (157·0 [40·2] vs 166·9 [48·4]; p=0·184), LDL (81·0 [20·6] vs 87·3 [29·9]; p=0·191), HDL (42·0 [11·4] vs 38·2 [6·5]; p=0·042), and BMI (24·4 kg/m(2) [SD 3·7] vs 25·0 kg/m(2) [3·8]; p<0·0001) were lower in the intervention group than in the control group. However, we noted no significant difference in diastolic blood pressure and heart rate. A community health worker-based personalised intervention strategy in patients with acute coronary syndrome improved adherence to evidence-based drugs and healthy lifestyles, and resulted in an improvement in clinical risk markers. Integration of trained community health workers can improve secondary prevention in coronary artery disease. US National Heart, Lung, and Blood Institute (NHLBI), National Institutes of Health, Department of Health and Human Services, and the UnitedHealth group, USA.