A US pilot has been removed from a flight after arriving late, out of uniform and using the PA system to engage passengers in a rant about her divorce and President Trump.

"Sorry I’m late, the reason I’m late is I’m going through a divorce," the female pilot said over the intercom before bursting into tears, BuzzFeed reports.

United Airlines Flight 455 was ready to depart Austin-Bergstom International Airport bound for San Francisco on Saturday when the incident took place.

The pilot then went on to criticise Donald Trump and Hilary Clinton calling them both “ass---".

Passenger Randy Reiss took to Twitter after he and more than a dozen passengers walked off the flight.

US pilot being removed from flight after rant. (Twitter: Randy Reiss)

" So, y'all. I'm shaking right now. I just left my United flight 455 'cos the captain demonstrated that she was not mentally in a safe space," he wrote.

Reiss said a short time later the captain was also removed from the plane and a new crew sent on board, NBC reports.

"United removed captain, but only after 40 of us stormed off and said she was not in a space to fly," he wrote on Twitter.

"I hope she gets the help she needs. That was scary as f--."

Reiss said the pilot was crying when she was escorted off the plane. She apologised for her actions.

Fellow passenger Sylvia Nguessan said she hugged the distressed pilot in the terminal to help try and calm her down.

United Airlines acknowledged the incident and apologised to its passengers.