But the number of jobless was down by 370,459 people from the same month last year, the ministry said in a statement, which called it "the best figure for the month of August since 2009".
Spain's economy relies heavily on tourism and August is usually a weaker month for the job market as summer hiring by hotels and restaurants tails off, factories slow and teaching contracts end.
All sectors saw an increase in unemployment in August although the rise was more pronounced in the services and industrial sector.
The increase in unemployment comes as politicians are still struggling to form a new government following two inconclusive elections in December and June which resulted in a hung parliament.
Spain's unemployment rate, which is calculated separately by national statistics institute INE, is still the highest in the eurozone after Greece's.
It stood at 20 percent in the second quarter of 2016.
But it has fallen significantly from a peak of 26.9 percent in early 2013 as the country struggled with the fallout of the collapse of a property bubble in 2008.