Napoleon Bayaga Lechoco, the Philippine lawyer who held his country's ambassador to the United States at gunpoint for 10 hours in the ambassador's office in 1974, gained his unconditional freedom yesterday in the wake of a jury finding that he was insane at the time of the embassy incident.

The jury returned that finding May 2. It meant that Lechoco, 47, was innocent of kidnaping and other crimes of which he had been found guilty at an earlier trial. It also meant that he was entitled to his release any time he could demonstrate to a court that he had regained his sanity.

U.S. District Judge Howard F. Corcoran held a hearing yesterday at which Dr. Thomas Polley of St. Elizabeths Hospital testified that he and other staff members at the institution found that Lechoco was not suffering from a mental illness and presented no danger either to himself or to others.

Corcoran then ordered Lechoco's unconditional release.

Looking dapper in a light blue suit, Lechoco stepped into the sunshine outside the U.S. courthouse here and said he thought the American judicial system was "very good, but not infallible. After all, we are all human beings."

He said he took the ambassado, hostage on that raw day in November, 1974, to compel the Philippine government to permit the eldest of his seven children, Napolen Jr., to join the rest of the family in this country.The youth arrived here two days later.

"I think it was very much worth it," Lechoco said of his actions. "I love my family then and now."

Napoleon Jr., now 18 and a senior at Potomac High School who plans to attend the University of Maryland next fall, and Lechoco's wife, Leticia, a secretary at Greater Southeast Community Hospital, stood at his side as he spoke.

Lechoco's release yesterday ended a case in which he twice went on trial. In 1975, a federal court jury found him guilty of kidnapping Ambassador Eduardo Z. Romualdez and specifically rejected Lechoco's contentition that he was insane at the time he did it. Judge Corcoran subsequently sentenced him to serve 10 years in prison.

Last fall the U.S. Court of Appeals ordered a new trial on the sanity issue.It ruled that certain witnesses had been improperly barred from testifying on Lechoco's behalf.

The second trial ended with the verdict of innocent by reason of insanity.

Assistant U.S. Attorney William H. Collins Jr., the prosecutor in the case, said after yesterday's hearing that St. Elizabeths doctors have maintained all along that Lechoco was sane.

Between his conviction after the first trial and the court of Appeals order for a new trial, Lechoco spent 15 months in prison. He spent the remainder of the time since the hostage incident either at St. Elizabeths or free on personal bond. After the verdict of innocent May 2, he was released in the custody of his attorney, Stuart Stiller.

Lechoco said yesterday that his time in jail had been "useful, in a sense.

"Since I can recall, I have been acratching in the earth for food," he said. "I never had time to read. So I read history, economics and politics while I was in jail."

He emerged from the courtroom with an armload of books he had read during his most recent stay at St. Elizabeths, during which doctors confirmed their earlier diagnoses that he was free from mental illness.

The books included "The Economic Impact of the American Civil War," "Economic History of the United States" and "Persons and Masks of the Laws"

Napoleon Jr. carried from the courtroom a schoolroom globe that had been used as a defense exhbit in the second trial to show the jurors the location of the Philippines.

"I've got the world in my hands," the youth said.

Mrs. Lechoco said she was "happy and grateful and relieved" that her husband is free.

Lechoco said he wanted first to get home to Oxon Hill and see the rest of his family. He said he hoped to be "reinstated" in his job as a legal clerk in the Prince George's County court system.

"Feeding my family is my great concern," he said.

Lechoco said several times that concern for his family had precipitated his actions at the embassy.

The incident began about 3:30 p.m. Nov. 18, 1974, when Lechoco had an appointment with Ambassador Romualdez. He pulled a gun on the ambassador and warned that he was prepared to do "something dramatic" to secure his son's departure from the Philippines.

At that point, Mario S. Lagdameo, an economic attache at the embassy, tried to subdue Loechoco. As D.C. police entered the building, shots were fired and Lagdameo was wounded superficially in the arm. For the next 10 hours, he lay on the floor of the ambassador's office pretending to be dead.

About 2 a.m. Nov. 19, having received assurances that his son would be permitted to leave the Philippines, Lechoco threw his pistol from a second-floor window and surrendered. The ambassador was unharmed.