Dr. Donald S. Fredrickson, one of the country's leading scientists, resigned yesterday as director of the government's National Institutes of Health for what he called purely personal reasons.

NIH sources said Health and Human Services Secretary Richard S. Schweiker told Fredrickson in January that he wanted him to stay, and last month the White House and Schweiker "signed off" on his reappointment.

Some NIH staff members, however, said there was speculation that he has not had full backing from the Reagan administration and that this was one reason for his departure. Fredrickson denied this, saying that it is just "time to shed" his relentless administrative burdens for a while.

The NIH is the world's largest collection of medical laboratories, and, with its $3.6 billion budget, the largest backer of medical research, both on its own campuses and at other medical centers. In his farewell to NIH workers yesterday, Frederickson described the NIH as the world leader in research in human biology.

It does have one current political problem, an unresolved attack on its National Cancer Institute and Dr. Vincent DeVita, NCI director, by some senators who accuse him of laxity in administering federally funded research grants.

"I have confidence in DeVita," Fredrickson said in an interview. In his address, he made only oblique reference to politics. He spoke of "so politically oriented a cosmos" in which even medical research exists, and warned that "the essense of [NIH's] greatness is fragile and could be destroyed by careless trustees."

But he said, "NIH is healthy, strong and in the prime of its life," though it now faces the prospect of smaller budgets, and other problems, including the ethical and social issues raised by the new biological revolution.

During Fredrickson's tenure, NIH began coping with these and made the first rules to curb some kinds of genetic research: work on recombining genes to make new organisms. It began "consensus conferences" to iron out controversies over new medical technologies and made stricter ethical rules for medical researchers.

A leading investigator of lipoproteins, which transport fats and probably play a role in causing heart disease, Fredrickson joined NIH in 1953. He became director of the then-National Heart Institute in 1966, and held other top posts until 1974-75 when he headed the National Academy of Sciences' Institute of Medicine.