In a somber and revealing speech, President Carter yesterday told a divided Democratic Party that it has allowed itself to be buried by "demagoguery and political timidity" on the energy issue.

Speaking in almost sermon-like tones, the president warned that the party's fate in the 1980 elections will hinge on the issue. Carter said, "How we handle the energy question is going to decide who wins and who loses because the American people are interested in seeing if we can work together."

Carter, addressing the Democratic National Committee meeting at the Sheration-park Hotel here, also came within an inch of announcing his candidacy for reelection. And he warned would-be opponents that when he decides to run he will contest every precinct, "and I have no doubt it will be sucessful."

"In spite of our problems, I look forward to the future, including 1980," the president said.

Carter's speech came at the end of a week in which he has suffered a series of legislative defeats on Capitol Hill, and party leaders in several states are reporting emerging efforts to draft Sen. Edward Kennedy (D-Mass.) for the party's 1980 nomination.

In introducing Carter, Detroit Mayor Coleman Young said, "the campaign to reelect the president is now on."

But instead of issuing a ringing rally cry to shore up the party faithful, Carter lectured them, alternately reciting the accomplishments of his administration and confessing his frustrations.

It was, Carter said, "a rare way for a politician, for a president" to speak "to his own party leaders, his own personal friends."

The energy issue dominated his remarks, and his warnings to party leaders.

At one point, Carter said he has spent "more time on energy than I have on SALT [the strategic arms limitation treaty], the Mideast, the Panama Canal treaty, or other policy questions all put together." At another juncture, he said that he'd been "scorned and ridiculed" in the press for calling the energy crisis "the moral equivalent of war."

Both Congress and the public have refused to accept the severity of the crisis, he said.

"They think that somehow or another a miracle is going to occur and a lot of oil is going to be released from secret hiding places, and if the federal government and oil companies would just quit cheating everybody, the energy problem is going to blow over," Carter said. "That's not going to happen."

Carter expressed bitterness over a series of legislative setbacks, including defeats on oil decontrol, gas rationing, and hospital cost containment measures.

He candidly accepted part of the blame for these defeats. "Maybe if I were a better politician, I would have gotten these bills through Congress," he said.

But he didn't hide this disgust with special interest groups and with Democrats in Congress who have refused to support him on energy votes.

"The American people are looking to us for honest answers and clear leadership," he said in a grave voice. "What they often see instead is a government which seems incapable of action at all."

"They see a Congress pushed and pulled in every direction by hundreds of well-financed and powerful private interest groups," he added. "They see every extreme position defended to the death by one powerful group or another."

Carter didn't single out any individual for special criticism. But he appeared to be chiding the five Democratic congressmen who earlier this week launched a national effort to oppose his nomination.

"The times we live in call for plain talk and political courage," the president said. "Slogans will not do the job. Press conferences will not solve the serious problems we face in energy, in inflation in maintaining peace in a dangerous world."

"We can argue, debate, evade and duck," he said. "But one fact remains clear. So long as we spend our time searching for scapegoats, weeping, wringing our hands and hoping for deliverance, our problems will get worse."

Carter received a warm if somewhat restrained response from the crowd of party leaders from around the country. Although many reported strong currents of anti-Carter feeling in their states, most Democratic Party leaders support the president.

In a straw poll conducted by CBS News, 69 percent of delegates said they favored Carter's renomination, while 26 percent favored Kennedy, and 2 percent favored California Gov. Edmund G. Brown Jr. Three percent checked a box labled "someone else."

In other business, the Democratic National Comittee approved:

A call for its 1980 convention that provides that half of the delegates are to be women

Voted to give Puerto Rico 41 delegates at the convention-a larger number of delegates than about two dozen states will have.

Announced plans to purchase space for a party headquarters in the District of Columbia.

Passed a resolution praising the 'killer bees," 12 liberal Democrats in the Texas legislature who went into hiding to successfully block passage of a measure that would have changed that state's primary election in a way beneficial to former Democrat John Connally, who is seeking the Republican nomination for president.