Charles W. Duncan Jr., who once worked as a oil company roustabout, reached the top of that field yesterday when he was sworn in as the new secretary of energy.

President Carter, just back from his Mississippi riverboard tour, praised Duncan in the White House ceremony as "a superb manager of sound judgment, of great intelligence" who had compiled "an admirable record" as deputy secretary of defense.

Duncan, 52, flanked by his wife and two children, responded that this was "the most significant day of my life."

He joined the audience of energy industrialists and military leaders in a standing ovation for outgoing energy secretary James Schlesinger, who received the National Security Award medal from President Carter.

The president was effusive in his praise for Schlesinger, who resigned last month under heavy criticism from most sides of the energy debate. Carter commended Schlesinger's "competence, intelligence and utmost integrity" and said he had "served our nation well in one of the most difficult jobs available.

"It was not James Schlesinger's first choice . . . to be secretary of energy," Carter added, noting that Schlesinger had twice asked to resign before Carter would let him go. "I can see he has an expression of anticipation and relief on his face now," Carter joked.

Duncan studied chemical engineering at Rice University and worked for two years as a roustabout and chemical engineer for the Humble Oil Co. of Texas. He rose rapidly through the ranks of his parents' Duncan Coffee Co., and as president merged the firm with Coca-Cola Co. in 1964. He moved to Atlanta as president of Coke in 1971, and there he me Gov. Jimmy Carter.

He left Coca-Cola in 1974 to return to Houston as an investment banker, but Carter pulled him to Washington in 1977, to fill the No. 2 job at the Pentagon.

The last 2 1/2 years there, Duncan said yesterday, were "the most interesting that I have spent." He thanked Defense Secretary Harold Brown, who was in the audience for being "my mentor and my friend."

Duncan's remarks provided little clue as to any shifts of direction that may occur during his tenure. He echoed Carter on the need to reduce dependence on foreign oil and to increase energy conservation, and pledged "to maintain an active and open dialogue with all elements that have an interest in energy."

Carter, who came directly from the airport to the ceremony, said his cruise down the Mississippi River had left him "reinspired with the commitment of Americans to deal in a competent way with the future." He said he had written all 6,000 chief executive officers of America's counties, cities and towns to urge them to further efforts at conserving energy.

Inviting all those present to a reception after the ceremony, Carter joked that the energy industry representatives would be expected "to come with a pledge of support" for Duncan in his new role.