A new 3D metal–organic framework {[Cd16(tr2btd)10(dcdps)16(H2O)3(EtOH)]∙15DMF}n (MOF 1, tr2btd = 4,7-di(1,2,4-triazol-1-yl)benzo-2,1,3-thiadiazole, H2dcdps = 4,4′-sulfonyldibenzoic acid) was obtained and its luminescent properties were studied. MOF 1 exhibited bright blue-green luminescence with a high quantum yield of 74 % and luminescence quenching response to a toxic natural polyphenol gossypol and luminescence enhancement response to some trivalent metal cations (Fe3+, Cr3+, Al3+ and Ga3+). The limit of gossypol detection was 0.20 µM and the determination was not interfered by the components of the cottonseed oil. The limit of detection of gallium(III) was 1.1 µM. It was demonstrated that MOF 1 may be used for distinguishing between the genuine sunflower oil and oil adulterated by crude cottonseed oil through qualitative luminescent and quantitative visual gossypol determination.