YG was flying high even before his flight left the gate ... at least according to American Airlines, which promptly kicked his allegedly drunken ass off the plane.

YG boarded the LAX to JFK flight Monday night, but wasn't there long. The rapper was pissed off as he made that long, lonely and embarrassing walk back down the jetway. He said, "F**k American Airlines! They said I'm drunk. I'm sober than a muthaf***a!"

American tells TMZ ... YG was indeed kicked off "due to being intoxicated." After seeing his video, though, AA tried to slide into his DMs.

As he made his exit, YG made it clear he thinks this was less about booze, and more about FWB. He blurted, "Racist ass muthaf***as. I'm sober!!"

The flight took off on time.