Zeolitic imidazolate framework-8 (ZIF-8) is synthesized quickly at room temperature in methanol with the support of ultrasound. Porous ZnO is also prepared via the thermal treatment of ZIF-8. The photocatalytic activities of the obtained materials are demonstrated via methylene blue (MB) decomposition under UV radiation. The obtained materials are characterized by means of X-ray diffraction (XRD), Fourier-transform infrared spectroscopy (FT-IR), scanning electron microscopy (SEM), nitrogen adsorption/desorption isotherms, UV-Vis diffuse reflectance spectra (DR-UV-Vis), and photoluminescence spectra. The results indicate that ZIF-8 and the materials obtained from ZIF-8 by heating in the air have photocatalytic activity under UV irradiation. The ZnO sample obtained by ZIF-8 calcination at 660°C for 5 h has the highest photocatalytic activity. However, the MB degradation photocatalytic efficiency of the ZnO samples is even lower than that of the ZIF-8 samples, indicating that ZIF-8 is an effective photocatalyst in the treatment of environmental pollution.