Two-photon autofluorescence (TPAF) imaging is able to offer precise cellular metabolic information with high spatiotemporal resolution, making it a promising biopsy tool. The technique is greatly hampered by the complexity of either the optical system or data processing. Here, the excitation wavelength was optimized to simultaneously excite both flavin adenine dinucleotide and nicotinamide adenine dinucleotide and eliminate the unexpected TPAF. The optical redox ratio (ORR) images were robustly achieved without additional calibration under the optimized single-wavelength excitation. The in vitro, ex vivo, and in vivo biopsy by the TPAF method were systematically studied and compared using hepato-cellular carcinoma and metastasis as examples. It was demonstrated that the proposed TPAF method simplified the optical system, improved the robustness of ORR, and enabled early-stage cancer diagnosis, showing distinguished advantages as compared with previous methods.