The cop who arrested T.I. outside the guard shack of his gated community talked major trash about the rapper and his level of fame ... and it was all captured on the officer's body cam.

TMZ obtained the footage from the Henry County officer who busted T.I. for public drunkenness and simple assault of the security guard back in May. The video shows the officer talking to the guard, who had refused to let T.I. enter when he didn't have his key. 

The guard's supervisor tells the cop, "That's T.I., the rapper." The cop repsonds, "He thinks his s**t don't stink" and then laughs. The supervisor agreed with the officer. 

TMZ broke the story, T.I. says the guard -- who was eventually fired over the incident -- had also cursed out Tiny when she called to say it was okay to let her husband enter their gated community.

DEMANDING ANSWERS
TMZ.com

T.I. was heated about the arrest and argued with cops after they took him into custody. He's been charged with 3 misdemeanors ... but most likely won't face any jail time if convicted.

We reached out to T.I.'s attorney, Steve Sadow, about the body cam footage. He declined to comment.