The spiral galaxy M51, also known as the Whirlpool Galaxy, was first discovered on October 13, 1773 by Charles Messier. It was one of Messier's first discoveries, and he first described it as a "very faint nebula, without stars". Messier's friend, Pierre Mechain, later discovered M51's companion galaxy NGC 5195 on March 21, 1781. There is controversy to what exactly M51 refers to in regards to the two galaxies. They are often simply referred to as M51A (NGC 5194) and M51B (NGC 5195).
M51 was the first galaxy in which spiral structure was discovered. It is sometimes referred to as Rosse's Galaxy because the spiral structure was discovered and documented by Lord Rosse in spring 1845. He made a very accurate and detailed drawing of M51 (shown below).
It is currently believed that it's spiral shape is because the interaction between NGC 5194 and NGC 5195. The gravitational influences caused movement in the gas clouds of the galaxies which produced immense star formation regions. There is also evidence of the possibility of a black hole in the centre of the galaxy.