We present photometry and images (3.6, 4.5, 5.8 and 8.0 μm) from the Spitzer Infrared Array Camera (IRAC) of the star-forming region Messier 8 (M8). The IRAC photometry reveals ongoing star formation in the M8 complex, with 64 class 0/I and 168 class II sources identified in several locations in the vicinity of submm gas cores/clumps. Nearly 60 per cent of these young stellar objects (YSOs) occur in about seven small clusters. The spatial surface density of the clustered YSOs is determined to be about 10-20 YSOs pc -2 . Fresh star formation by the process of 'collect and collapse' might have been triggered by the expanding H II regions and winds from massive stars. IRAC ratio images are generated and studied in order to identify possible diagnostic emission regions in M8. The image of 4.5/8.0 μm reveals a Brα counterpart of the optical Hourglass H II region, while the ratio 8.0/4.5 μm indicates PAH emission in a cavity-like structure to the east of the Hourglass. The ratio maps of 3.6/4.5, 5.8/4.5 and 8.0/4.5 μm seem to identify PAH emission regions in the sharp ridges and filamentary structures seen east to west and north-east to south-west in the M8 complex.