What object was M1, the first catalog entry, and what event prompted Messier's discovery of it?

Answer

The Crab Nebula, discovered while observing Halley's Comet return

The first object listed, M1, is the Crab Nebula, and Messier discovered it in 1758 while observing the return of Halley's Comet.

What object was M1, the first catalog entry, and what event prompted Messier's discovery of it?
astronomydeep-sky objectscelestial objectsCatalogcatalogueMessierCharles Messier