Detection of heavy metals have been pivotal due to their non-biodegradability and food chain accumulation. Herein, a multivariate ratiometric sensor was developed by in situ integrating AuAg nanoclusters (NCs) into electrospun cellulose acetate nanofibrous membranes (AuAg-ENM) for visual detection of Hg2+, Cu2+ and consecutive sensing of l-histidine (His), which was integrated into a smartphone platform for quantitative on-site detection. AuAg-ENM achieved multivariate detection of Hg2+ and Cu2+ by fluorescence quenching, and subsequent selective recovery of the Cu2+-quenched fluorescence by His, which distinguished Hg2+ and Cu2+ and fulfilled determination of His simultaneously. Notably, AuAg-ENM achieved selective monitoring of Hg2+, Cu2+ and His in water, food and serum samples with high accuracy comparable to ICP and HPLC tests. A logic gate circuit was devised to further explain and promote the application of AuAg-ENM detection by smartphone App. This portable AuAg-ENM provides a promising reference for fabricating intelligent visual sensors for multiple detection.