The economy contracted by 3.6% in 2016, meaning it is now 8% smaller than it was in December 2014.
The country has been hard hit by the fall in commodity prices and an internal political crisis that has undermined investor confidence.
However, analysts believe the economy should start to pick up from here.
The two-year slump has seen the number of unemployed rise by 76% to 12.9 million, a rate of 12.6%.
Brazil was once one of the fastest-growing economies in the world, the 'B' in the Brics group of nations regarded by many investors are having the world's best growth potential.
Its key exports - including oil, soy and metals, were in hot demand.
But as growth in the biggest element of that grouping, China, began to slow so did demand for commodities and their prices.
Another drag factor has been corruption, which has engulfed Brazilian society at the highest levels, seeing off its President, Dilma Rousseff for illegally manipulating government accounts, and involving some of the country's biggest and best-known companies.
Analysis, Daniel Gallas, South America business correspondent
Twenty-four consecutive months of negative growth is a social disaster for an emerging country like Brazil.
The number of unemployed people increased to 12 million people over a short period of time. It is as if the entire population of a country like Greece or Portugal were now looking for jobs and not finding anything.
But there are some signs that this recession may be soon over.
Brazil's monthly inflation rates suggest prices in the economy are stabilising, and interest rates are falling at a faster pace than expected. This could fuel consumption and investment and speed up the country's recovery.
Also there could be tailwinds from the global economy, with prices of commodities on the rise again and possible growth coming from the US.
But much of Brazil's recovery still depend on whether government reforms in public spending are successful.