The White House has asked Loretta Cornelius to resign as deputy director of the Office of Personnel Management, five months after her damaging testimony before the Senate jettisoned the career of former OPM director Donald J. Devine, according to administration and OPM sources.

The sources said an announcement of Cornelius' resignation is "forthcoming." They added that President Reagan has not become involved in her departure.

"I think there'll probably be an announcement tomorrow Tuesday ," said one well-placed administration source. "My understanding is that it is relatively well-known."

But Cornelius' attorney, Joseph Petrillo, denied that Cornelius would leave her job. "She is not resigning," he said. "Dr. Cornelius serves at the pleasure of the president. And as far as she is concerned, the president has not asked her to resign."

The sources, who spoke on condition that they not be quoted by name, said the ouster is being handled by staff members in the Cabinet secretary's office and did not require the president's personal intervention. "This is pretty much an administrative matter," one source said.

Conservative supporters of Devine had demanded the White House fire Cornelius since her June 5 testimony before the Senate Governmental Affairs Committee, in which she accused Devine of asking her to lie to the panel. Devine was forced to vacate his position as OPM director while awaiting reconfirmation for a second four-year term. Cornelius, as deputy director, briefly succeeded him, serving as acting director of the nation's civil service.

During Devine's reconfirmation hearings, it was learned that he secretly tried to continue running the civil service after his term had expired. Cornelius testified that Devine asked her to lie and say that she had known about his unusual delegation of authority.

In the face of certain defeat in the Senate, Devine withdrew his name and the White House nominated Constance Horner, who was easily confirmed as OPM director. But the fate of Cornelius, who reverted to her job as deputy director, remained uncertain as angry conservatives blamed her for Devine's fall and began a campaign to discredit her.

OPM's inspector general also launched an investigation into allegations, appearing in The Washington Times, that Cornelius used OPM employes and research -- and a government car -- to complete her work on a doctoral thesis from the Washington branch of the University of Southern California.

Petrillo, Cornelius' lawyer, said yesterday that the inspector general's report was complete and "she has been cleared of all the allegations." On the question of whether she improperly used her government car, Petrillo said, "Dr. Cornelius is looking into that."

One source said yesterday that the White House decision to fire Cornelius is less related to the inspector general's investigation than to anger among conservatives over the Devine affair.

After Devine withdrew, Cornelius -- as acting OPM director -- began a purge of Devine's top assistants from the personnel agency, prompting even harsher cries for her firing. The White House at the time was reported to be livid, although presidential spokesman Larry Speakes said then, "The White House has given her no direction on how to run the agency."

Horner, after her confirmation hearings, would not comment on Cornelius' fate.