Diabetic ketoacidosis is a medical emergency and treatment should be given promptly to save the life of the patient.
Diabetic ketoacidosis develop due to absolute or relative deficiency of insulin along with excess production of hormones which causes increase blood glucose level like glucagons, growth hormone, catecholamines and cortisol. Insulin deficiency along with glucagon excess is required to produce diabetic ketoacidosis. When insulin ratio falls in compare to glucagons it causes gluconeogenesis (production of glucose from non carbohydrate like protein and fat, and usually take place in liver), glycogenolysis (breakdown of glycogen to glucose and increase blood glucose) and increase formation of ketone bodies (which is responsible for the acidosis) in liver. The increase in glucagons and deficiency of insulin also cause delivery free fatty acids and amino acids from fat and muscle to the liver which in turn cause increase glucose production and rise in blood glucose level through gluconeogenesis.
Insulin deficiency and hyperglycemia reduces the hepatic level of fructose-2,6-phosphate. This in turn alters the activity of phosphofructokinase and fructose-1,6-bisphosphatase. Glucagon excess reduces the pyruvate kinase activity and insulin deficiency increases phosphoenolpyruvate carboxykinase activity. These causes pyruvate to synthesize glucose instead of glycolysis (breakdown or metabolism of glucose) in liver. Increase glucagon and catecholamines along with insulin deficiency promote glycogenolysis in liver and there is excess of glucose in blood. Insulin deficiency impairs glucose uptake into skeletal muscle and fat and reduces glucose metabolism.
Ketosis (excess ketone bodies which are acidic and cause acidosis) is due to increase Free Fatty Acid (FFA) release from fat cells and also due to increase synthesis of ketones in liver. Normally FFA are converted to triglycerides and VLDL (very low density lipoprotien) in liver, but due to insulin deficiency and excess growth hormone and cathecholamines there is increase in lypolysis (breakdown of fat to form free fatty acids) and release of FFA. Ketone bodies exist as ketoacids, which are neutralized by bicarbonate and as bicarbonate stores are depleted, metabolic acidosis develops.
Diabetic ketoacidosis develops as a result of inadequate plasma insulin. Diabetic ketoacidosis is seen in illness or infections when requirement of insulin increases. If insulin production does not increase as in type1 diabetes due to destruction of insulin secreting β cells of pancreas, diabetic ketoacidosis can be precipitated. This is the reason diabetic ketoacidosis is generally seen in type1 diabetes not in type2 diabetes (due to presence of insulin secreting β cells in pancreas).
Sometimes diabetic ketoacidosis is seen if patient forgets to take insulin injection and if short acting insulin preparations are used. With short acting preparations a brief interruption in insulin supply can cause severe insulin deficiency and precipitate diabetic ketoacidosis.

