Herein, a new type of composite metal-organic framework sensor for evaluating diabetic ketoacidosis was designed and prepared using in situ fluorescence imaging of phosphate and pH, which provides a new way to effectively evaluate the diabetic complication-ketoacidosis in the early clinical stage.