Differentiation of xylene isomers remains as one of the most important challenges in the chemical industry, mainly due to the similar molecular sizes and boiling points of the three xylene isomers. Fluorescence-based chemical sensors have attracted wide attention due to their high sensitivity and versatile applications. Here, we report a novel fluorescent metal-organic framework named NUS-40, which is able to selectively detect and discriminate o-xylene from other xylene isomers. Suspension of NUS-40 in o-xylene produces a distinct red shift in the fluorescence emission compared to that in either m-xylene or p-xylene. Moreover, the extent of peak shift is dependent on the concentration of o-xylene in xylene isomer mixtures, and the observed linear correlation between fluorescence intensity and o-xylene concentration is beneficial for quantitative detection. The possible mechanism of such responsive fluorescence behavior was investigated by Fourier transform infrared spectroscopy, proton nuclear magnetic resonance, and vapor sorption experiments. In addition, facile metalation of the porphyrin centers with metal ions provides an additional route to fine-tune the sensing properties.