Improving adherence to medication offers the possibility of both reducing costs and improving care for patients with chronic illness. We examined a national sample of diabetes patients from 2005 to 2008 and found that improved adherence to diabetes medications was associated with 13 percent lower odds of subsequent hospitalizations or emergency department visits. Similarly, losing adherence was associated with 15 percent higher odds of these outcomes. Based on these and other effects, we project that improved adherence to diabetes medication could avert 699,000 emergency department visits and 341,000 hospitalizations annually, for a saving of $4.7 billion. Eliminating the loss of adherence (which occurred in one out of every four patients in our sample) would lead to another $3.6 billion in savings, for a combined potential savings of $8.3 billion. These benefits were particularly pronounced among poor and minority patients. Our analysis suggests that improved adherence among patients with diabetes should be a key goal for the health care system and policy makers. Strategies might include reducing copayments for certain medications or providing feedback about adherence to patients and providers through electronic health records.