Aims: To evaluate the impact of community-based drug treatment on methamphetamine use using inverse probability of treatment-weighted (IPTW) estimators to derive treatment effects. Design: A longitudinal prospective cohort study with follow-ups at 3 months, 1 year and 3 years. Treatment effects were derived by comparing groups at follow-up. IPTW estimators were used to adjust for pre-treatment differences between groups. Setting: Sydney and Brisbane, Australia. Participants: Participants were methamphetamine users entering community-based detoxification (n = 112) or residential rehabilitation (n = 248) services and a quasi-control group of methamphetamine users (n = 101) recruited from the community. Measurements: Frequency of methamphetamine use between interviews (no use, less than weekly, 1–2 days per week, 3+ days per week), continuous abstinence from methamphetamine use, past month methamphetamine use and methamphetamine dependence. Findings: Detoxification did not reduce methamphetamine use at any follow-up relative to the quasi-control group. Relative to quasi-control and detoxification groups combined, residential rehabilitation produced large reductions in the frequency of methamphetamine use at 3 months [odds ratio (OR) = 0.23, 95% confidence interval (CI) 0.15–0.36, P < 0.001), with a marked attenuation of this effect at 1 year (OR 0.62, 95% CI 0.40–0.97, P = 0.038) and 3 years (OR = 0.71, 95% CI 0.42–1.19, P = 0.189). The greatest impact was for abstinence: for every 100 residential rehabilitation clients there was a gain of 33 being continuously abstinent at 3 months, with this falling to 14 at 1 year and 6 at 3 years. Conclusions: Community-based residential rehabilitation may produce a time-limited decrease in methamphetamine use, while detoxification alone does not appear to do so.