"Mainz" was ordered under the contract name "Ersatz" and was laid down in September 1907 at the AG Vulcan shipyard in Stettin. She was launched on 23 January 1909 and christened by the "Oberburgermeister" (Mayor) of Mainz, Karl Göttelmann, after which fitting-out work commenced. She was commissioned into the High Seas Fleet on 1 October 1909 and began sea trials on 23 October; these were interrupted from 24 November to 17 January 1910 and again from 23 February to 19 May for additional work in the yard because her performance was unsatisfactory. On 6 June, "Mainz" joined the reconnaissance force of the High Seas Fleet, taking the place of the light cruiser . She was assigned to II Scouting Group, which screened for the battlecruisers of I Scouting Group. Her first commander was "Fregattenkapitän" (Frigate Captain) Friedrich Tiesmeyer, the uncle of Ernst Lindemann; he held the command until January 1910.