EXCLUSIVE

8:54 AM PT -- Sheriff spokesperson Steve Whitmore tells TMZ ... the decision to terminate Mee was "not connected to the Mel Gibson arrest at all."

Whitmore adds, "We disagree with the characterization ... this was not retaliation."

The L.A. County Sheriff's deputy who famously arrested Mel Gibson in 2006 for DUI is about to be fired ... TMZ has learned.

Sources tell us ... Deputy James Mee has received a letter stating that the Sheriff's Dept. intends to give him the boot for allegedly violating procedure by engaging in a high-speed pursuit that ended in a fiery explosion.

Mee and his lawyer, Richard Shinee, have accused the Sheriff's Dept of retaliating against the Deputy because Sheriff Lee Baca believes Mee is the one who leaked 4 pages of Mel's arrest report to TMZ. Mee's superiors had ordered the deputy to remove the 4 pages, which contained a blow-by-blow of Mel's anti-Semitic tirade on Pacific Coast Highway. The Sheriff's Dept. repeatedly told TMZ ... Mel was arrested "without incident" and no anti-Semitic remarks were uttered.

The incident that triggered the firing occurred on June 17, 2011, when Mee attempted to stop a driver who was allegedly drunk. The driver, who was traveling around 30 mph, gunned it and was going more than 100 mph when his car skidded into a gas station, hitting 2 pumps which triggered an explosion. Check out the security footage.

In the letter, the Sheriff's Dept. accuses Mee of not only violating the pursuit policy but lying to his superior about his involvement in the chase. The main gripe was that Mee didn't immediately notify emergency officials there was a crash. Mee's lawyer, Richard Shinee says Mee DID promptly reach out for help.

Shinee tells TMZ, "Nobody in the history of the Sheriff's Dept. has ever been fired for allegedly violating the pursuit policy." Shinee says these are "trumped up charges calculated to vindicate their wrath against him."

Shinee adds, "This final act of retaliation falls on the heels of a series of retaliatory acts by the Sheriff's Department."

A hearing is scheduled for Thursday, where Mee can plead his case, but sources tell us the die has already been cast.