A murder charge has been dropped against the man who last week turned himself into police claiming he was responsible of the Oct. 2 slaying of Ronald J. Pettine, a former Morris K. Udall campaign aide whose nude, battered body was found near the Iwo Jima Memorial in Arlington.

Thomsa S. McDonald, identified by U.S. Park Police as a native of Merriam, Kan., and student at an unnamed university here, was ordered released late Tuesday by U.S. Magistrate Harris Grimsley in U.S. District Court in Alexandria.

The magistrate ordered McDonald to undergo psychiatric treatment and to return to Kansas with his parents. Park Police who questioned McDonald over the weekend said it was clear he had no knowledge of or connection with Pettine's murder. McDonald previously had been under care of a psychiatrist, but he had no criminal record, Park Police said yesterday.

McDonald was arrested Thursday night in a Richmond bus terminal after he approached a policeman and announced, "I'm the guy everybody is looking for in the killing of Ronald Pettine." He was arraigned in Alexandria the next day on the murder charge. He was held in Alexandria jail in lieu of $100,000 bond until his release.

Park Police said McDonald was charged and held because that is the usual procedure when someone allegedly "confesses" to a crime.

McDonald's car also was impounded by Park Police Friday after it was discovered abandoned beside the C&-O Canal, near Lock 6, just off MacArthur Boulevard in the Brookmont section of Montgomery County. The car's door locks had been broken and the keys were in the ignition, police said.

The car was released to McDonald 's parents, who flew from Kansas after his arrest. Police said McDonald had left the car beside the canal and taken a bus to Richmond, but why he did that is not clear. The bus was impounded for safekeeping and investigation, police said, as are all cars abandoned for more than 48 hours on National Park Service property.

The Pettine murder is till under investigation by Park Police detectives, who said they are continuing to interview the hundreds of alleged homosexuals arrested on sodomy charges over the past year at the Iwo Jima Memorial.

A popular tourist spot by dayM the memorial had been a rendezvous for homosexuals at night until Pettine's slaying. The woods around the memorial have since been cleared of underbrush and there have been no arrests here since Oct. 2, police said yesterday.

Within 45 days before the murder, police had arrested 60 men on sodomy charges, there and had arrested as many as 103 on similar charges there within a two-month period in 1975.

Pettine, 32, who lived in Springfield with his wife and two children, was a sometime homosexual, according to at least four people who worked with him in Udall's presidential campaign last spring. He directed scheduling and advance work for Udall and in 1975 had been a deputy secretary of state in pennsylvania.

He had been appointments secretary to Pennsylvania Gov. Milton Shapp during his gubernatorial campaign in 1970 and was campaign aide to Sen. Hubert H. Humphrey (D-Minn.) during his 1968 presidential campaign.