Sugar is a main source of energy for the cells that make up muscles and other tissues. Insulin helps sugar enter the cells in the body. Without enough insulin, the body can't use sugar to make the energy it needs. This causes the release of hormones that break down fat for the body to use as fuel. This also produces acids known as ketones. Ketones build up in the blood and eventually spill over into the urine. Diabetic ketoacidosis usually happens after: An illness. An infection or other illness can cause the body to make higher levels of certain hormones, such as adrenaline or cortisol. These hormones work against the effects of insulin and sometimes cause diabetic ketoacidosis. Pneumonia and urinary tract infections are common illnesses that can lead to diabetic ketoacidosis. A problem with insulin therapy. Missed insulin treatments can leave too little insulin in the body. Not enough insulin therapy or an insulin pump that doesn't work right also can leave too little insulin in the body. Any of these problems can lead to diabetic ketoacidosis. Other things that can lead to diabetic ketoacidosis include: Physical or emotional trauma Heart attack or stroke Pancreatitis Pregnancy Alcohol or drug misuse, particularly cocaine Certain medicines, such as corticosteroids and some diuretics