Macrophages are dynamic immune cells that govern both normal tissue function and disease progression. However, standard methods to measure heterogeneity in macrophage function within tissues require tissue excision and fixation, which limits our understanding of diverse macrophage function in vivo. Two-photon microscopy of the endogenous metabolic co-enzymes NAD(P)H and flavin adenine dinucleotide (FAD) (metabolic autofluorescence imaging) enables dynamic imaging of mouse models in vivo. Here, we demonstrate metabolic autofluorescence imaging to assess cell-level macrophage heterogeneity in response to normal and cancerous tissue microenvironments in vivo. NAD(P)H and FAD fluorescence intensities and lifetimes were measured for both tissue-resident macrophages in mouse ear dermis and tumor-associated macrophages in pancreatic flank tumors. Metabolic and spatial organization of macrophages were determined by performing metabolic autofluorescence imaging and single macrophage segmentation in mice engineered for macrophage-specific fluorescent protein expression. Tumor-associated macrophages exhibited decreased optical redox ratio [NAD(P)H divided by FAD intensity] compared to dermal macrophages, indicating that tumor-associated macrophages are more oxidized than dermal macrophages. The mean fluorescence lifetimes of NAD(P)H and FAD were longer in dermal macrophages than in tumor-associated macrophages, which reflects changes in NAD(P)H and FAD protein-binding activities. Dermal macrophages had greater heterogeneity in optical redox ratio, NAD(P)H mean lifetime, and FAD mean lifetime compared to tumor-associated macrophages. Similarly, standard markers of macrophage phenotype (CD206 and CD86) assessed by immunofluorescence revealed greater heterogeneity in dermal macrophages compared to tumor-associated macrophages. Ultimately, metabolic autofluorescence imaging provides a novel tool to assess tissue-specific macrophage behavior and cell-level heterogeneity in vivo in animal models.