The Trans World Airlines jet that Shiite Moslem gunmen hijacked two months ago left the Beirut airport amid tight security today with a three-member volunteer TWA crew at the controls.

The Boeing 727, guarded by Lebanese Army soldiers and policemen, flew off at 12:45 p.m., local time, to Larnaca, Cyprus.

The plane's departure followed a night of rocket and artillery duels across the Green Line separating Moslem and Christian sections of the city and shelling from the Druze-held hills overlooking the airport. The new fighting left at least 10 persons dead and 60 wounded from shelling of Moslem and Christian residential areas.

Also killed today was the Lebanese driver of the West German ambassador's armor-plated car, which was fired on by Christian Lebanese Forces militiamen while crossing the Green Line, the Christian Voice of Lebanon reported.

The Moslem extremists who commandeered the Athens-to-Rome flight on June 14 forced it to land here, killing U.S. Navy diver Robert D. Stethem, a passenger. The gunmen held 39 other Americans hostage for 17 days until they were released on June 30.

Shiite leader Nabih Berri, who played a key negotiating role in gaining the hostages' release, called then for a no-retaliation U.S. guarantee, but President Reagan on July 1 terminated the U.S. landing rights of Lebanon's state-run Middle East Airlines and later tried to persuade U.S. allies to join an international boycott of Beirut airport.

Since early July, a Syrian military observer has kept watch over the Beirut airport as part of a Damascus-sponsored security plan.

TWA Capt. Richard Fox, 51, said he and crew members Jim Corler, 46, and Carl Seeland, 42, all from New York's John F. Kennedy International Airport, traveled quietly to Beirut early today aboard a Middle East Airlines flight from Cyprus. One reason for leaving the TWA airliner behind in June was that Beirut was not considered safe then for American flight crews and the Lebanese airline crews were not trained on the Boeing 727s.

Fox said his crew had responded to a TWA request for volunteers.

"We were apprehensive going in and glad to get out," Fox said after the jet's arrival in Cyprus.

The pilot said that TWA, working through the Lebanese government and its airline, had the plane ready for takeoff when they arrived. "We just showed up, showed our identity [documents] and were brought to security people who knew who we were," he said. It was not clear whether the volunteers had American or other passports.

Airport deputy director Khaled Saab said the militias involved must have agreed to let the aircraft leave after "behind-the-scenes contacts." Other airport sources linked the TWA plane's departure to the arrival Monday of the first weekly flight from Damascus in seven years by the Syrian airline Syrianair.

Progress in the staged release of Lebanese prisoners held at Israel's Atlit jail, the hijackers' main demand, could have been another factor.