Critics of President Carter's foundering energy legislation are attributing much of the trouble to Energy Secretary James R. Schlesinger. They accuse him of manipulating data and abandoning friends.

Politics, the thinker wrote, represents the art of calculated cheating - or more precisely, how to cheat without really being caught."

The author of that Machiavellian maxim was James R. Schlesinger, writing 10 years ago in a presitigious law journal as an academician far from the real and tawdry world of Washington politics.

Today, as secretary of energy and Tully a part of that world, Schlesinger is entangled in a politicial web of his own words and actions.

The web is wrapped around President Carter's foundering national energy program, for which Schlesinger is the principal spokesman and arbitrator. His task is formidable - convincing consumers, business and Congress that today's pain of higher energy program, for which Schlesinger more energy.

But increasingly, Schlesinger himself is an issue in the debate, with some critics, including former admierers, attributing much of the administration's energy problems to the secretary. They accuse him of manipulating data, abandoning friends, making promises on which he does not deliver.One senator flatly calls him a liar.

Making it worse, others contend, is that Schlesinger's reputation as brilliant manager finally has run out on him. A widely held view on Capitol Hill and in industry circles in that chaos rules, the low morale and old-boy satrapies are endemic in Schlesinger's Department of Energy.

One problem is that the lengthy battle over enactment of President's Carter's energy package has changed from substantive to political. The centerpiece is the interminable squabble over natural gas price deregulation - and Schlesinger sits right in the middle.

There is a kind of poetic cruelty here. By all appearances, Schlesinger has Carter's utmost confidence. And for whatever it means, the major oil companies have warmed to him. He also has the confidence of some key congressional leaders - Speaker Thomas P. (Tip) O'Neil Jr. (D-Mass.), Sen. Henry M. Jackson (D-Wash.) and Rep. Thomas Ashley (D-Ohio), among them.

Get, politically, his utility to Carter could be in doubt if the energy package goes down, sunken finally by the furor over natural gas.

The latest in a series of flaps was Schlesinger's trade of increased funding of breeder reactor research for support of the natural gas pricing bill. Key administration allies - Sens. Dale Bumpers (D-Ark.) and Mark O. Hatfield (R-Ore.) - felt betrayed. Sen. James A. McClure (R-Idaho), who struck the deal, extracted it in writing - a symbol of the distrust permeating the energy debate.

This was preceded by other instances of maneuvering and data-handling that rebounded on Schlesinger and DOE's credibility. Some examples:

House members who fought successfully for Carter's gas plan with minimal changes were dismayed when Schlesinger traded away some of its tough provisions in the Senate.

Legislative support for the plan was diluted when DOE reversed its projections that higher gas prices would sharply increase supplies.

Schlesinger last year promised oil producers that he would - on his own - increase the price of some domestic oil. But he didn't quickly follow through. The infuriated oil-state legislators and created aditional credibility problems for the secretary.

The effort to sell the idea of an energy crisis, with the help of Central Intelligence Agency forecasts of shortages, has been undercut by a world oil glut, conveniently overlooked by DOE when the energy plan was sent to Congress last year.

Schlesinger's response generally is that no deals have been made, that allies were not abandoned and that DOE has merely adjusted its figures slightly to reflect gas market changes since Carter's bill went to Congres in April 1977.

The quarrel over numbers is only a part of the equation. Schlesinger's problem with Congress springs in part from personal style. Intentionally or not, he conveys an air of aloofness, intellectual superiority and arrogance - traits not all endearing to congressional audiences.

"He has a great ability to look at a complex issue," said Richard Perle, a Schlesinger admirer and aide to Jackson. "But if he has a shortcoming, he is ill at ease in the backslapping sort of politics that a lot of politicians regard as a mode of policy analysis."

So these are hard times for a man who apparently still has not mastered the subleties of political trench warfare. It is a new phase in Schlesinger's Washington career, in which a mystique about his intellect and talent made him defense chief, guardian of the atom, head of intelligence - answering only to presidents and docile congressional committees.

Inside the White House, the for the record view is beneficient. Carter's chief domestic adviser, Stuart E. Eizenstat, put it this way: "Whatever problems we have had in Congress have not been Jim's doing, but because it is a highly controversial matter. Jim has done the best job anyone could do under the circumstances . . . No one is looking for scapegoats."

There exists, however, an inside opinion that Schlesinger is a debit. Another senior administration official said, "The biggest problem in all this can be wrapped up in one word: Schlesinger."

That view is echoed on Capitol Hill by legislators who, once boosters of Schlesinger, have soured over the secretary's handling of the politics of energy.

Rep. Toby Moffett (D-Conn.), a liberal conferee on the gas deregulation bill, complained, "We were carrying the water for the administration (last year) and yet at every turn it was Schlesinger who wanted us to cave in to the Senate, which everyone knows is producer-dominated. . . It was hard to be a defender of their policies when Schlesinger was leading the retreat."

That retreat, controversial in itself, touched off a dispute that continues: Has Schlesinger's DOE willfully manipulated data to suit political goals?

In an interview last Friday, Schlesinger offered an answer. "The role of analysis has been to attempt to elevate the level of political discussion," he said. "There was a major change in the base date last January. We made it very clear at that time."

Schlesinger's answer is echoed by close aides such as Leslie Goldman, a deputy assistant secretary, who said claims of manipulation are "unfair . . . The base case shifted because of new information."

Such responses do not satisfy critics. Sen. James Abourezk (D-S.D.), a leading opponent of the new compromise reached last month, is particularly outspoken about Schlesinger and his tactics.

"He lies a lot, he takes data and changes it and does anything necessary to support whatever he wants to do," Abourezk said. "A year ago he got the CIA to make it look like we had an immediate oil shortage. He covered up the U.S. geological reports about oil reserves to try get his oil program approved.Now he says that unless you raise the price of natural gas, international bankers will lose confidence in the dollar."

Abourezk and the bill's other opponents are not alone in their skepticism. Texas independent oilman Jack Allen, an industry leader, said of DOE, "We can't make their numbers match up on the production of anything. We don't know where their data comes from."

That concern was summarized by an aide to one senator, echoing the talk in legislative backrooms:

"The gas fiasco is the same basic thing as the breeder deal - tell them anything they want to hear at the moment and worry about it later."

Throughout the debate, Schlesinger's greatest political strength is his personal relationship with Carter, which associates of both men say is based on "chemistry" - an affinity for unimpassioned analysis and engineering solutions.

Schlesinger was an honors graduate at Harvard, with a doctorate in economics. He taught at the University of Virginia, and spent a term with Rand Corp., a California thinktank, producing strategic studies.

A decade ago, Schlesinger caught the eye of Henry Jackson, one of the Senate's foreign affairs hardliners, when he testified on the limits of the analysis that dominated the management of the Vietnam war - a favorite Jackson target.

Soon afterward, under Jackson's patronage, he took a job at the old Bureau of the Budget. From there, the new president, Richard M. Nixon, dispatched him to head the Atomic Energy Commission.

Other stops during the Nixon era included the CIA, which he headed for less than a year, and the Defense Department, where he remained until he was fired ignorminiously by President Ford in 1975.

Ostensibly, the issue was spending - Ford wanted less, Schlesinger more. But intimates of Ford say it was more a personality clash. Schlesinger tended to lecture and Ford didn't appreciate it.

A year later, as Carter associates describe it, Schlesinger met with candidate Carter before his second campaign debate with Ford. It was to be a neat ploy: Ford's spurned defense secretary would be photographed advising Carter on military affairs. Ford would be rattled, Carter would win votes.

The photo sessions ran on for hours.Schlesinger impressed Carter who, to the surprise of advisers, asked the former defense chief to join his team. Shocked Democratic liberals rebelled at the idea of Schlesinger returning to Defense. By the time Carter took office, Schlesinger had been named the new president's energy adviser.

But the brawling, earthier energy arena was a new game for Schlesinger. In his other political life, each of his departments and their big issues found tailor-made constituencies on Capitol Hill. Policy was made with nods from plaint or sympathetic legislators.

Schlesinger acknowledges that. "Here," he said, "the problem is forging a national consensus. That means one has to deal with antagonistic interests."

When Schlesinger became the first secretary at the new Department of Energy last year he was, in effect, starting from scratch. But DOE, a conglomerate of new and old energy related agencies drawn from other corners of government, is having problems that do no contribute to a sense of congressional security about energy policy.

These difficulties are recognized by the White House. "Unlike any secretary in the Cabinet, he has been organizing the department while trying to get through comprehensive legislation," said Eizenstat. "He has done as well as anyone could."

But another White House official said, "During this whole period, the department has been out of control, and it still is to some extent."

Many in the energy field contend that Schlesinger's difficulties spring from his second-and third-level appointments. They are, by and large, people who had worked with him at Defense, CIA and AFC, including a large share of Republicans. DOE's congressional liaison job - the key contact with Capitol Hill - has been vacant for two months and Schlesinger is unable to fill it.

"He is a very valuable guy, whether at the department or somewhere else," another White House official said. "He is smart and loyal to the president, but he is a lousy politican. . . He is just not legislatively skilled. DOE has made promises it can't keep."

In the supercharged atmosphere of energy politics, it might be said, Schlesinger is running on empty.