Adm. Bobby Ray Inman is quitting as deputy director of the Central Intelligence Agency, the White House announced yesterday.

Inman, 51, formerly director of the National Security Agency and highly regarded in intelligence, plans to go into private industry where, as one who knows him well put it, "he can get back to running something."

Inman last year made no secret of his reluctance to give up the number one job at the NSA, the agency that collects most of its intelligence through electronic intercepts, to become the number two executive at the CIA under William J. Casey. In his year as deputy director of the CIA, Inman has received high marks from influential senators and representatives but has waged bitter, behind-the-scenes battles with officials in the White House National Security Council.

One big issue, administration sources said, was the extent of CIA spying within the United States. Inman resisted going as far as some NSC officials desired, but ended up endorsing President Reagan's decision to authorize covert CIA activities in this country. Historically domestic intelligence has been the province of the Federal Bureau of Investigation with the CIA limiting its intelligence collection to overseas.

White House sources said last night that Inman was unhappy with the decision by William P. Clark, Reagan's national security adviser, to review the CIA and defense budgets. Inman argued that the White House was getting too deeply into the agency business, but did not resign for that reason, they said.

There also have been reports that Inman chafed under Casey's brand of leadership, once calling the director "the wanderer" because of his penchant for flying off to hotspots all around the world. Other sources said yesterday that Inman also felt Casey had too much enthusiasm for risky CIA undertakings overseas.

Inman told The Washington Post that he wanted to give the administration plenty of notice so it could find a successor and have a smooth transition at the agency. He said he had hoped to leave in June but might stay on until Labor Day.

He denied that he and Casey had been at odds, terming the relationship "cordial."

A big influence on his decision, Inman said, was to increase his income to educate his two sons, aged 16 and 19.

He told President Reagan of his decision to resign in a March 22 letter stating that he felt it was "time that I move on to fresh challenges."

In a response dated yesterday, Reagan accepted the resignation "with deep regret."

"Your dedication and contributions to the United States over more than 30 years of naval service have been of inestimable value," the president told Inman. "You leave the intelligence community in a strengthened and enhanced posture."

The resignation was greeted with dismay on Capitol Hill where Inman was much more popular, among both Republicans and Democrats, than Casey. In fact, Sen. Barry Goldwater (R-Ariz.) and others made it plain immediately after the 1980 elections that Inman was their first choice for the directorship. But Casey wanted the job and had the inside track with the president-elect.

Voicing regret at Inman's leaving, House Intelligence Committee Chairman Edward P. Boland (D-Mass.) called him "the nation's finest professional intelligence officer."

Boland said the committee had been impressed by Inman's "clear command of many difficult and complex subjects . . .his candid opinions and . . . his forthright and honest presentation of the facts."

Casey, by contrast, had been criticized in congressional quarters for being less forthcoming, at least during his first year on the job. Dissatisfaction over Casey's ill-fated choice of a Reagan campaign colleague, Max Hugel, as chief of CIA covert operations led Goldwater last year to call publicly for Casey's resignation.

The White House blunted the drive, partly by letting it be known that Inman had no chance of being named to replace Casey.

An articulate and complicated man who often conveyed soothing impressions without actually committing himself, Inman sometimes sounded like a hard-liner, sometimes like the intelligence community's leading defender of civil liberties.

At the outset of last year's prolonged wrangling over a new and less restrictive executive order to govern the intelligence community, Inman predicted publicly that the final order would contain nothing giving the CIA power to carry out covert operations in the United States.

The final order, in December, authorized just that, in support of "objectives abroad." Inman defended the new provisions and contended that they were really limited.

On another occasion, as NSA director, he assured a Senate committee that his agency had no difficulty with the Freedom of Information Act and that he saw no need for major changes. As deputy CIA director, he assailed the law's application to both the CIA and NSA and said it had caused "serious problems" for both agencies.

Asked by a reporter about the shift, he smiled and said he had been less outspoken before "because we couldn't get more before."