A dual-stimuli responsive strategy is developed for the detection of melamine and temperature. Flavin mononucleotide (FMN) was immobilized onto layered double hydroxide (LDH) nanosheets through a layer-by-layer process. The as-prepared composite films show higher emission intensity, prolonged fluorescence lifetimes and fluorescence responses towards melamine and temperature.