The South African government today ordered an American reporter for The Associated Press to leave the country in two weeks.

Cynthia Stevens, 32, who has been in South Africa as a staff writer for the news agency since February 1979, was not given any reason for her expulsion.

"It is not our policy to give explanations of such decisions," said J.C. Pretorius of the Ministry of Internal Affairs.

In New York, AP President Keith Fuller protested that "even under the worst of circumstances a correspondent has the right to know of alleged transgressions."

Stevens had no comment. The move appears to be part of tougher government action against what it perceives as negative coverage by foreign correspondents living here.

In August, the government formally charged the Johannesburg bureau chief of United Press International, Nathan Gibson, with sending a story "calculated to alarm or depress members of the public." Gibson's trial begins Monday. The charge is a misdemeanor that carries a fine of up to $1,000 and up to five years in jail. Gibson is the first foreign correspondent to be charged under the new Defense Act.

In 1978, the South Africans declined to renew the work permit of a resident American free-lance reporter for the Chicago Tribune, but the last resident American correspondent expelled was Joseph Lelyveld of The New York Times in 1965. He was allowed to return last year.

Stevens' work permit and residence visa expired in March. When she applied for renewals, the authorities said no decision had yet been made on whether to extend them. In June, she was given a retroactive three-month work permit that expired June 26, three weeks after she received it.

Stevens was called to the Pretoria office of the deputy director general of the Ministry of Internal Affairs and handed a letter saying that "after careful consideration" it had been decided not to renew her permit. She was ordered to leave the country in seven days, but at her request the deadline was extended to 14 days.