It was the perfect start for the hosts as Marco Reus won a free kick just outside the box and stepped up himself to put his side ahead in the first minute.
Neven Subotic prodded a Jakub Blaszczykowski corner goalwards, but could not direct his effort either side of the goalkeeper.
Dortmund were peppering the Mainz goal and Marcel Schmelzer twice went close but they just could not find a second.
Lewandowski had another effort saved and Mats Hummels a close-range header blocked as Dortmund continued to press.
Eventually Dortmund did grab the second late on through Lewandoswki's strike.