The Rev. Al Sharpton owed at least $1.8 million in back taxes before striking a sweetheart deal with the feds last summer that chopped the bill almost in half and kept him out of the slammer, The Post has learned.

A series of federal liens — the most recent of which was filed earlier this month — provide a window into the massive tax debts the firebrand activist incurred since 2002 as he remade himself into a millionaire media personality, newly released documents show.

Treasury Department officers say Sharpton owed $351,798 from 2007, according to a document filed March 3 with the New York County Register Office.

This unpaid balance — a potential mix of back taxes and penalties — comes on top of a federal lien filed last Nov. 13 for $1,367,521 covering tax years 2005 and 2006.

All the liens are filed as “1040” or personal income tax and listed his address as 680 Madison Ave. — the uber-swanky Helmsley Carlton House where Sharpton resides.

Last July, Sharpton cut a deal with federal prosecutors in Brooklyn to end a longstanding criminal probe of his finances that reportedly encompassed his personal fortune, his quixotic 2004 presidential campaign spending and the National Action Network, his advocacy group.

Sharpton said he’d personally pay back $1 million, including $500,000 upfront, as part of the settlement. But, the liens show his debts ran much deeper.

“Rev. Al Sharpton is meeting his tax obligations with the IRS through an agreement that was completed in late summer of 2008. Since that time, he has made substantial payments and continues to do so. Any federal tax liens that have been filed are inclusive of all years included in the agreement. As those payments have been made, tax liens have been released,” said longtime Sharpton attorney Michael Hardy.

So far, only two additional liens worth $90,753 were released since the settlement, records show. IRS protocol allows tax debtors to immediately remove paid debts from their record by calling a toll-free 800 number.

Liens, which are a claim on property to cover a debt, are the last step the IRS will take before seizing a debtor’s assets.

Sharpton also was hit with a $19,914 lien filed on Dec. 31, 2008, from unpaid taxes in 1996.

Meanwhile, Sharpton also owes the New York State Department of Taxation and Finance, which was not part of the July settlement, $884,669, according to two liens covering years 2002 through 2006.

Hardy said those debts are being addressed.

Sharpton reportedly earns $750,000 a year hosting a syndicated radio talk show. He also collects anywhere from $15,000 to $20,000 per lecture and $2,000 per church sermon. On top of that, Sharpton does “consulting” work for corporations.