Diabetic ketoacidosis is a complication of diabetes. It happens when the body makes high levels of ketones. Ketones are a chemical substance created when the body burns fat instead of glucose for energy.