The demand for the removal of pollutants in aqueous solution has triggered extensive studies to optimize the performance of adsorbents, but the adsorption rate and selectivity of adsorbents have been overlooked. Hierarchically ordered porous vinyl-functionalized UIO-66 was used as supporter to prepare a surface molecular imprinted polymer (MIP-IL@UIO-66). The UIO-66 with large specific surface area significantly increased the number of active site of polymer, and so the MIP-IL@UIO-66 can achieve the rapid and highly selective adsorption of sulfamethoxazole (SMZ) in water. The structure and morphology of MIP-IL@UIO-66 was examined using scanning electron microscopy, Fourier transform infrared spectroscopy, nitrogen adsorption-desorption isotherms, thermogravimetry, X-ray photoelectron spectroscopy, and X-ray powder diffraction. Results indicate that the presented MIP-IL@UIO-66 has an ultrafast equilibrium rate (equilibrium time, 10 min), large adsorption capability (maximum capacity, 284.66 mg g−1), excellent adsorption selectivity (selectivity coefficient, 11.36), and good reusability (number of cycles, 5 times) via equilibrium adsorption experiments. Subsequently, as a novel solid phase extraction (SPE) adsorbent, the adsorption performance of SMZ onto MIP-IL@UIO-66 was better than that of a commercial SPE adsorbent. A MISPE column combined with high-performance liquid chromatography (HPLC) was presented to detect SMZ in water, soil, egg, and pork samples with recoveries of 91–106%. Hydrogen bonds, electrostatic and π-π interactions, and molecular memory were attributed to recognizing the SMZ of MIP-IL@UIO-66.