Cancer incidence and mortality are rapidly growing worldwide, resulting in heavy social and economic burdens. Early detection as well as precise intraoperative diagnosis of cancers is crucial to improving the prognosis and thus significantly decreasing the mortality. Two-photon excitation fluorescence lifetime imaging microscopy and spectroscopy not only shows the outstanding capability of label-free, intravital, high-resolution, three-dimensional imaging but also allows the quantitative biochemical characterizing of live tissues. Benefiting from these advantages, this technology is promising for early detection and demarcation of malignant tumors. However, its full potential has not been extensively evaluated in clinical settings. Here, we assess the feasibility of using two-photon excitation fluorescence lifetime imaging microscopy and spectroscopy to identify various cancers, including esophageal cancer, gastric cancer, and brain cancer. In terms of esophageal cancer, we compared the fresh human esophageal mucosal tissues of normal, squamous cell carcinoma, and adenocarcinoma. For gastric cancer, we performed a systematic investigation on fresh human gastric mucosal specimens at typical stages of gastric carcinogenesis. In addition, by developing a mouse chronic cranial window, we carried out a preliminary study on glioma margin identification in vivo. By extracting fluorescence spectrum and lifetime information of endogenous fluorophores, qualitative and quantitative indicators which are found to have the potential to discriminate normal, premalignant and different malignant lesions are derived. This study may shed new light on the early detection, precise intraoperative diagnosis, and classification of digestive tract cancers and brain cancers. With advances in endoscopy, two-photon excitation fluorescence lifetime imaging microscopy and spectroscopy has the potential to become a noninvasive, label-free, real-time histological and functional cancer detection tool in the future.