He was checking travel documents when he was shot.
Two other TSA officers were also shot and wounded.
The gunman was reportedly shot in the mouth and leg and the FBI later identified him as Paul Anthony Ciancia, a 23-year-old from Los Angeles.
Ciancia's family had recently become concerned after he sent his brother and father "angry, rambling" texts about the Government, living in Los Angeles and his unhappiness generally.
Airport police Chief Patrick Gannon said the shooter caused a "large amount of chaos". People ran for their lives and took shelter wherever they could as authorities pursued the gunman.
An otherwise normal day in the airport's Terminal 3 was turned upside down around 9.20am, local time when the gunman approached a checkpoint.
There, he "pulled an assault rifle out of a bag and began to open fire", Gannon said.
He ran down Terminal 3, equipped with three magazines for his weapon.
Gannon said two officers from his department responded within seconds and pursued the gunman to gate 36, where he was shot.
They didn't take any chances with the wounded suspect, handcuffing him to a gurney as he was being carried out, CNN reported.
Wings and The Sopranos actor Tim Daly said that when he was eventually led out of the the Virgin America first-class lounge, he saw where the incident came to a head at gates 35 and 36.
After being told not to step on any blood or glass, Daly saw a rifle on the ground, a pair of black shoes and several bags strewn across the floor.
Also there were more than 100 rounds of unspent ammunition, Los Angeles Mayor Eric Garcetti said, enough to "have killed everyone in that terminal today".
Los Angeles police chief Robert Beck credited the responding airport police officers with heroically saving lives with their efforts. Even once the suspect was shot and detained, law enforcement officers roamed the airport with guns drawn looking for others who might have involved.
One of the world's busiest airports quickly went into lockdown as large portions were evacuated and authorities ordered a "ground stop"for arriving planes.
About 750 flights were affected by the ordeal. The area around the airport was jammed with cars as police shut down access and people in the terminals were pushed out.
Even 6 hours after the shooting, people were still huddled on footpaths outside the airport, because they had no place else to go.
Soon after, the airport resumed operation, but Terminal 3 remained closed.