For years Prince George's County law enforcement officials were convinced that Leslie L. Barger, 64, was the murderer who got away.

Twice convicted of second-degree murder in the 1963 bedroom shooting of a Lanham man who surprised Barger in bed with the man's estranged wife, Barger jumped an appeal bond 14 years ago and was believed by many to have fled to Mexico or Spain.

"We had heard he'd left the country," said Prince George's County prosecutor Arthur A. Marshall Jr. It was a surprise then, on Monday, when the FBI called Marshall to say they had their man.

Acting on a tip, FBI agents arrested Barger in a modest second-floor garden apartment in Annandale rented to a "D.C. Barger," where the FBI said he had lived for the past year with a woman it identified as his wife, Doris.

The FBI said Barger had rarely left the building during that year and declined to say anything more about the tip that led to the fugitive. The apartment where the law officers found him was only a block away from an address his lover gave as her home during Barger's first trial in 1963.

Barger, a graying, 6-foot-tall former real-estate salesman, waived an extradition hearing before a federal magistrate in Alexandria yesterday morning and was returned by late afternoon to the Prince George's County Detention Center where he was held without bond.

As he was being taken to the Sheriff's Department there, he told reporters he "regrets" that his freedom had ended and said his past 14 years had been "rewarding."

In his brief appearance before federal Magistrate W. Harris Grimsley, Barger was equally circumspect. "I don't go by that name anymore, your honor," he told Grimsley after the magistrate referred to him as Leslie Lynn Barger. He did not elaborate.

"Are you willing to return to Maryland?" Grimsley asked. "I have kind of a divided mind about that," Barger replied, and left the courtroom. Moments later he agreed to waive extradition and was taken by two sheriff's deputies to Upper Marlboro.

"What a surprise," said Joseph A. DePaul, the College Park lawyer who represented Barger at his two trials. "The last time I saw him was on Rehoboth Beach back in '66 or '67. I've never heard from him since, although I've gotten calls asking about his whereabouts . . . It's been a long time. It's interesting that he would come back."

Prosecutor Marshall speculated that the FBI tip, which was believed to have come from Baltimore, might have stemmed from a federal computer cross-check if Barger applied for Social Security or some other federal benefit. "It's about time for that. He's 64, turning 65," Marshall said.

Assistant State's Attorney Lou Lorscheider agreed, saying that the Reagan administration is cross-checking "everything on the computers 40 different ways," a practice that Lorscheider said had resulted in a dramatic increase in uncovering welfare fraud cases.

An FBI spokesman said the Social Security Administration was not the source of its tip, but an agency spokesman in Alexandria would not elaborate on who the tipster was, saying that to do so might endanger its source.

Residents of the Fairmont Gardens Apartments off Little River Turnpike in Annandale said yesterday they had believed that the woman in the Barger apartment was living alone. She walked with a cane and was known to the residents as "April."

"We had no idea she had a man up there," said one elderly woman, as she sat on a bench in front of the red and white brick apartments. "Not until they brought him out in handcuffs yesterday."

A woman who answered the telephone at the apartment yesterday declined to comment.

The Barger case attracted considerable publicity when it went to trial in 1963, and subsequently another trial in 1966 and three appeals. Barger was free on $10,000 bond when he lost the final appeal. He failed to surrender in April 1968 to begin serving his 16-year prison term.

Barger, then 45, was married for the second time and employed as a real estate salesman in Hyattsville. He was charged with killing Henry W. Koch, 29, a National Aeronautics and Space Administration engineer. According to court testimony, Koch broke through two locked doors to enter the bedroom of his wife's Lanham home where he found his wife in bed with Barger.

Barger picked up a .25-caliber automatic weapon he had placed by the bed and fired six shots, all of which hit Koch. Sandra Koch was wounded slightly and her husband died 33 hours later at Prince George's County Hospital.

Barger and Sandra Koch both testified that they had been in bed reading H.G. Wells' "Outline of History" when Koch broke into the room. Barger said he was "completely terrified" that Koch was going to kill him when he decided to shoot, but he had had "no thought" of killing him. The jury convicted Barger of second-degree murder but Barger's attorneys later successfully appealed the verdict on a technicality.

During a second trial in 1966 Sandra Koch testified that she had given birth to a daughter three months earlier and had named her Robin Leslie Barger. "I'm not married," she testified then, but in Pennsylvania, where she was living then, "neighbors know me as Mrs. Barger."

Barger was again convicted of second-degree murder after the second trial.

State's Attorney Marshall said yesterday he intended to file charges against Barger for jumping bond, and that he believed Barger should have been taken directly to the Maryland Penitentiary in Baltimore instead of the Prince George's jail.

According to Marshall, Barger will be sent directly to the prison after the bail-jumping charge is considered by a county judge. He served a total of four months in jail between his two trials, but the last judge who sentenced Barger refused to give him any credit for that time, saying he was not entitled to any leniency.