Energy Secretary James B. Edwards yesterday was offered, and is expected to accept, the presidency of the Medical University of South Carolina.

Edwards, who would be the first Cabinet member to leave the Reagan administration, said he hasn't decided to accept the post, which he has sought since last January.

University trustees told Edwards, a 54-year-old dentist and former South Carolina governor, that he can assume the presidency at his convenience.

In a statement released by his office, Edwards said he was "flattered and pleased" by the job offer and appreciated that the university "is allowing me adequate time in which to reach a decision."

He said he would not decide whether to leave the Cabinet until he talks with President Reagan "because of my strong commitment to the administration and the tasks still before me.

"Only after I have given the matter a lot of careful and prayerful consideration will I be able to give the board of trustees my decision," he added.

Edwards took over the Energy Department with the clear understanding that his principal task would be to dismantle the 4 1/2-year-old agency, a job that remains incomplete.

He seemed to relish this. During his early months in office, he boasted he wanted to close down the department "and work myself out of a job."

Reagan last December announced a plan to abolish the department and transfer most of its functions to the Commerce Department. But the administration has yet to send the necessary legislation to Congress, and Sen. Lloyd Bentsen (D-Tex.) said this week that Congress had abandoned its dismantling plans.

Edwards has said this wouldn't stand in his way of leaving Washington.

The energy secretary has long been expected to be the first Cabinet member to leave the administration. Appointed after Sen. Strom Thurmond (R-S.C.) and other southerners complained the South had been neglected in the Cabinet selection process, he fell into early disfavor with administration officials who said the dentist was over his head in his job.

He toyed with running again for governor of South Carolina this year against incumbent Democrat Richard W. Riley, but eventually rejected that idea. He has been considering the medical university presidency at least since last January, when he met with the school's search committee for what he called "a nice, pleasant discussion."

Since that meeting, his name has been at the top of the list of contenders to succeed William H. Knisely Jr., who resigned Oct. 16 amid controversy over the school's administration. Knisely remained as acting president, a post he will relinquish in mid-May when Dr. Marcus Newberry, dean of the MUSC college of medicine, becomes acting president.

MUSC, founded in 1824, is a state-supported university separate from the University of South Carolina. Located near Edward's home in Charleston, S.C., it is the oldest medical school in the South and has a student body of 2,200.

Edwards served as governor from 1974 to 1978, and remains one of the state's most popular and best known Republicans. He and Thurmond led the South Carolina campaign for John B. Connally, the former Texas governor, during the 1980 GOP primaries.

Edwards has been mentioned as a possible successor to Thurmond should the senator not seek reelection in 1984, and has maintained close ties with party leaders in his home state. This weekend, for example, he is scheduled to attend the party's state convention in Columbia, S.C.