Harold C. Lyon, the former director of federal programs for gifted children, pleaded guilty yesterday in Arlington Circuit Court to charges of aiding prostitution but denied that he had ever received money for his actions.

"I'm not a panderer, I never have been," Lyon said after entering a guilty plea at the scheduled start of his trial on pimping charges. "Money was never my motivation. It was this sexual compulsion."

Lyon's comments came moments after he told Chief Judge William Winston he would accept the surprise plea bargain hammered out by his attorneys and prosecutors in a three-hour meeting held in the office of Commonwealth's Attorney Henry E. Hudson.

Under terms of the agreement, Lyon, 46, agreed to plead guilty to the misdemeanor charges of aiding prostitution, which carry a maximum three-year prison term. He was originally charged with two counts of pandering and one count of conspiracy to commit pandering, which are felonies and carry a maximum 30-year prison term.

A West Point graduate and former Army officer who has written three books emphasizing sexual liberation and self-awareness, Lyon was arrested Oct. 14 on various prostitution and pimping charges by Arlington police, who answered an advertisement he placed in Met Personals, a Washington sex-oriented tabloid. Last month an Arlington judge dismissed the prostitution charge.

"This thing has been a very trying period of time for my family and me," said Lyon, who stood before the judge flanked by his attorneys, his chin raised, his fists clenched at the sides of his brown three-piece pin-striped suit. "The victims in this activity have been primarily myself."

Lyon, who retired from his $50,000-a-year job with the Department of Education last month, said he wanted to apologize to those who "as a result of my activity, acts which they expected to be private and I expected to be private" were made public, he said, turning to face them.

Lyon, who lives in Middletown, Md., said he decided yesterday to accept the plea bargain--which he said "the prosecution kept offering and offering"--largely to spare his family the pain of a public trial.

Hudson vehemently denied that prosecutors had repeatedly offered Lyon the chance to plea-bargain. Sources close to the case said they believe Lyon accepted the bargain after he and his attorneys learned prosecutors planned to call several surprise witnesses.

During a preliminary hearing last month two Arlington detectives testified they learned of Lyon's activities after answering a Met Personals ad offering the services of a "beautiful, petite . . . young lady" who "models submissively with boyfriend or alone" for "sincere, generous, gentle people."

That woman was Susanna McIntyre, 27, the Argentine-born wife of a former State Department official, who testified she gave Lyon 20 percent of the money she earned posing for pornographic pictures.

McIntyre and her husband, Kevin-John McIntyre, were arrested by Arlington police Oct. 2 in an undercover apartment police had rented. Detectives posing as customers seeking to make a pornographic movie paid them $325 to film them having intercourse and then charged the couple with sodomy and prostitution.

Police agreed to drop the charges against Susanna McIntyre after she agreed to cooperate with them and testify against Lyon. On Oct. l4 she arranged to meet Lyon there. Police said he was arrested after he accepted $200 from an undercover police officer in exchange for the sexual services of Susanna McIntyre.

Lyon, who is free on $5,000 bond, is scheduled to be sentenced March 26.