The bis-imidazolium salt 1,4-bis[N-(9′-anthracenyl-methyl)imidazoliumyl]butane hexafluorophosphate (L1H2·(PF6)2) and its N-heterocyclic carbene (NHC) silver(I) macrometallocycle [(L1Ag)2](PF6)2 (1) have been prepared and characterized. 18-Membered macrometallocycle of 1 is formed via two ligands (L1) and two silver(I) ions. The selective recognition of m-dinitrobenzene (DNB) using 1 as a host was studied on the basis of fluorescence titrations, 1H NMR titrations, HRMS spectra and IR spectra. The results indicate that 1 can distinguish effectively m-dinitrobenzene with other aromatic compounds.