Over the space of a few weeks, Loretta Cornelius has risen from bureaucratic obscurity to center stage in a turbulent shakeup of the civil service. In the process, however, she may have jeopardized her future at the government's personnel agency, according to congressional and agency sources.

Cornelius, 49, a former corporate executive and Virginia Republican activist, was appointed deputy director of the Office of Personnel Management in 1981, and became acting director when Donald J. Devine's term expired March 25. Devine temporarily became her assistant while awaiting Senate reconfirmation.

But Cornelius attempted to fire Devine after she learned April 29 that he had signed a "delegation of authority" order -- without telling her -- that gave him the power to act as director.

Her testimony at a Senate hearing Wednesday -- where she said Devine asked if she could lie about her knowledge of his actions -- played a key role in his decision to withdraw his nomination yesterday.

Although Cornelius might have been in line to succeed Devine, her testimony may have jeopardized her chances, Republican congressional sources and OPM staff members said.

"She is politically dead. She committed an act of high political treachery" by testifying about Devine, a top-ranking OPM official and Devine loyalist said. "You don't name somebody to a top job who has just undercut the president's nominee." Devine loyalists for several weeks have been trying to plant negative stories in the news media about Cornelius.

Another top OPM staffer who supports Cornelius acknowledged that her chances of getting the top job or even remaining at the agency may be jeopardized now. "It is a tough situation for her because she is going to be viewed as the person who brought down Don Devine," he said.

Cornelius earned praise for her testimony from Sen. Ted Stevens (R-Alaska) and Thomas F. Eagleton (D-Mo.), who said she showed bravery and fortitude. Devine also praised her "general forthcomingness" at the hearing, but said she had misunderstood him. He would not comment on her fitness to succeed him.

Cornelius declined to be interviewed yesterday.

In her 15-year business career, Cornelius became vice president for administration at PRC Data Services Co. of McLean, where she supervised several hundred employes and managed a multimillion-dollar budget. She lives with her husband, Francesco A. Calabrese, in Warrenton where she is a neighbor and supporter of Sen. John W. Warner (R-Va.)

"She is clearly an individual who supports the Reagan administration's philosophy, but she has a different way of relating to people than Dr. Devine," an OPM official said. "She is a very calm person who doesn't get rattled and she has basic beliefs about what is right . . . .