An American librarian working at the University of Zambia has been missing for two weeks and is presumed dead while another American professor has been on a hunger strike in Lusaka's central prison for the past nine days after being picked up at the airport on suspicion of being a spy.

U.S. Embassy officials identified the missing American as Michael Sweeney, 39, of Portland, Ore., who disappeared June 28 while hitchhiking on the main highway from Lusaka to the northern town of Kitwe.

Sweeney, a librarian at the main university campus here in Lusaka, was on his way to the Kitwe branch on business. He may have met either Zambian bandits or Zambabwean nationalist guerrillas and never arrived at his destination. He has not been heard of since.

He was married to a Zambian and had been working here for the past seven years, according to his university friends, who presume he was picked up, robbed and then killed.

There have been a number of kllings of Zambians and foreigners around the captial during the past nine months by gangs that have been identified in the local press as either runaway guerrillas or armed Zambian bandits.

An American identified as James M. Gardner, 34, was arrested upon arriving as Lusaka Airport from Johannesburg July 3 and producing a second passport for immigration officials marked "valid for southern Africa only."

He has been on hunger strike ever since and his friends here say he is "very weak but surviving."

Gardner is head of the applied psychology department at the University of Witwatersrand in Johannesburg but had come to Lusaka to discuss possible employment with the psychology department of the university here.

Art Veno, the department's acting head, said Gardner was extremely well known in his field of community psychology and had published at least 20 books. He had taught at Queensland University in Australia before going to Witwatersrand in 1977.

The American psychologist was detained at the airport upon his arrival for 5 1/2 hours, released and then arrested after he passed through customs.

In a letter sent from his prison cell, Gardner said he had been refused medical attention and that the police had taken away special medicine he carried with him for a heart condition. At one point he sescribed conditions in the prison as "primitive" and "unfit for civilized people."

Later, however, he said he had been "kind, courteous and concerned" about his welfare.

Veno said the police had accused Gardner of being a spy and that Gardner had denied it.

The imprisoned American said in his letter that his hunger strike was in protest of "the cruelty and insensitivity" of Zambian authorities and the failure of the U.S. Embassy to act on his case.

An embassy spokesman said both Sweeney's disappearance and Gardner's plight had been brouhght to the attention of the Zambian Foreign Ministry.He said Gardner has been visited repeatedly by a consular officer since his arrest.

Under Zambian law, a person can be held for up to 14 days without being offically charged. Gardner has b yet to be charged with any crime, embassy officials said.

This spring, the U.S. government warned Americans traveling to Zambia that security conditions here had "deteriorated" and that those going on their own for tourist purposes "should be discouraged from doing so."

The Zambian government reacted sharply to the U.S. circular that contained the warning, saying it was an "unfriendly act" initiated by "agents" and sympathizers" of Zimbabwe-Rhodesia and South Africa.

Most foreign resident, however, would probably agree that the security situation has deteriorated due to repeated Rhodesian air and ground attacks on nationalist guerrilla sites in and around the capital since last October.

In addition, Zambian security officials have been extremely security conscious recently because of the forthcoming Commonwealth summit conference and the visit by Britain's Queen Elizabeth II starting July 27.