3:35 PM PT -- David Bennett of Thav Gross P.C., attorney for Franklin's Estate, says the Estate disputes the claim as Aretha paid off the vast majority of her debt before she died. He says, "The Estate is diligently working to resolve any remaining issues."

When Aretha Franklin died in August she left behind a legacy as the undisputed "Queen of Soul" ... and also a huge debt to Uncle Sam.

According to legal docs obtained by TMZ ... the IRS claims Franklin owes more than $6.3 MILLION in back taxes from 2012 to 2018, and an additional $1.5 mil in penalties.

One of Aretha's former lawyers tells us the massive tax lien is the result of several audits over the last 6 years. The weird thing ... one of the years in question is listed as 2018, and that tax year is not over.

We broke the story ... the "Respect" singer's being dogged in death by more than just the tax man -- her lawyer also filed docs in October demanding the estate pony up nearly $54k to cover bills dating back 6 years.

There's also a new lien filed by a publishing company that wants $136,000 for royalties in connection with the 1973 song "Angel."

Say a little prayer for the person managing her finances.