Luminescent 3D lanthanide metal-organic framework (Ln-MOF) {[Tb-2(TATAB)(2)]4H(2)O6DMF}(n) (1) was synthesized under solvothermal conditions by using flexible ligand 4,4,4-s-triazine-1,3,5-triyltri-p-aminobenzoate (TATAB). A phase transition was observed between low temperature and room temperature. The luminescence of 1 could be enhanced by formaldehyde and quenched efficiently by trace amounts of benzaldehyde in solvents such as benzyl alcohol (0.01-2.0vol%) and ethanol (0.01-2.5vol%). This is the first use of a Ln-MOF as chemical sensor for both formaldehyde and benzaldehyde. The high sensitivity and selectivity of the luminescence response of 1 to benzaldehyde allows it to be used as an excellent sensor for identifying benzaldehyde and provides a simple and convenient method for detecting traces of benzaldehyde in benzyl alcohol based injections. This work establishes a new strategy for detection of benzaldehyde in benzyl alcohol by luminescent MOFs.