An official said the passenger was subdued by a crew member and another passenger who was a retired law-enforcement officer.
A passenger on board the flight posted video on their Instagram feed of federal agents taking the man off the plane.
"Crazy! Someone tried to break into the cockpit on my flight from LA to Honolulu. We were greeted by the FBI. They are now taking us off the plane a few rows at a time for dog sniffing and interviews. I've never seen anything like this," the passenger under Instagram name BPLUS.noisefloor.dnb wrote alongside the post.
American Airlines said it did not immediately know the person's nationality.
That information is not required for manifests on domestic flights. But according to Hawaii News Now, the man is a 25-year-old Turkey national.
The Los Angeles Police Department said at LAX, the man was involved in a separate security incident and was detained but subsequently released, Hawaii News Now reports.
The media outlet reports police said the suspect went through a door from a concourse that led onto an airfield ramp. He was spotted by a contractor and detained.
"Airport Police investigated and determined (he) had been drinking but did not meet the criteria for drunk in public," Los Angeles Police said, in a statement.
The suspect subsequently got on board the American Airlines flight.
US Department of Homeland Security Secretary John Kelly was briefed on the incident, according to a statement from the department.
There are no other reports of disruptions, but the department said it is monitoring all flights on Friday out of caution.
Two eyewitnesses say the man did not make it to the cockpit door.
Instead they say he was stopped by a flight attendant who had jammed her serving cart in the doorway that separates first class from coach.
Lee and Penny Lorenzen of Orange County, California, were sitting in first class and saw a strange look on the flight attendant's face.
The attendant then took off down the aisle with her cart to block the passenger from advancing, saying: "You're not coming in here."
Passenger Allison Forberger, an eyewitness who lives in Kapolei, Hawaii, was seated right behind first class.
She also says the passenger who created the disturbance never stepped foot into the first-class area.
Lorenzen says other passengers grabbed the man. They took him to the back of the plane and duct-taped him to his seat.
"A Police K-9 searched and cleared the area. (He) was arrested for misdemeanour trespassing, cited, given a pending court date and released from custody."