They were ordered in place of the last four of the first group of steam-propelled K-class fleet submarines, K17-K21, the original orders being cancelled.
They were initially intended as coastal bombardment vessels, submarine monitors, but their role had been changed before detailed design begun. The intention was that merchant ships could be engaged at periscope depth or on the surface using the gun, rather than torpedoes. At that time torpedoes were considered ineffective against moving warships at more than 1,000 yards (900 m). A 12-inch gun fired at relatively short range would have a flat trajectory simplifying aiming, and few ships would be expected to survive a single hit.
The guns were 12-inch (305 mm) 40 calibre Mark IX guns from spares for the Formidable-class battleships. The mounting allowed them to elevate by 20 degrees, depress 5 degrees and train 15 degrees in either direction from the centre line. The weapon was normally fired from periscope depth using a simple bead sight on the end of the gun aligned with the target through the periscope at a range of around 1200 metres. The exposure time of the gun above the surface was around 75 seconds. The submarine had to surface to reload the gun, which would take about 3 minutes. In practice the concept was not very successful and only three of the four M-class boats ordered were completed, all between 1917 and 1918. M-class submarines are sometimes called submarine monitors.
M1 and M2 also had four 18-inch (450-mm) torpedo tubes whilst M3 and M4 had 21-inch (533 mm) diameter tubes and were 3 metres longer to accommodate them.
M1 was the only one to enter service before the end of World War I but did not see action. She was captained during her sea trials by experienced submariner Commander Max Horton after his return from the Baltic, and was later lost with all hands while on exercise in the English Channel near Start Point in Devon after a collision with a Swedish collier, SS Vidar, on 12 November 1925. The wreck of M1 was discovered by a diving team led by Innes McCartney in 1999 at a depth of 73 metres. Later that year the wreck was visited again by Richard Larn and a BBC TV documentary crew, and the resulting film was aired in March 2000.
M2 was converted to a seaplane carrier in 1925, a hangar replacing the gun turret. She was lost off Chesil Beach on 26 January 1932. It is thought that the hangar door was opened prematurely. M2 lies in much shallower water, 32 metres deep with the top of the conning tower only 20 metres below the surface at low tide. She is a popular attraction for local scuba divers with as many as six boats anchored above her on busy days.
M3 was converted to a minelayer in 1927 with stowage for 100 mines, primarily to test the mine-handling equipment of the Grampus class. The mines were carried on a conveyor belt which ran along her upper deck and covered over by an enlarged casing. The mines were laid through a door at the stern. She was scrapped in 1932 after the trials had been completed.
In 1924 all three completed members of the class were used to test hull camouflage to reduce the visibility of submarines from aircraft—M1 was painted grey-green, M2 dark grey and M3 was painted dark blue.