Jim Kehoe, who said yesterday he never intended to stay longer than one year in his second stint, will retire as athletic director at the University of Maryland, effective Aug. 1.

Kehoe, 62, has served as acting athletic director since last May. He came out of semiretirement to take over when Carl James resigned to become commissioner of the Big Eight Conference.

The major reason cited for Kehoe's return was a $400,000 deficit run up by the athletic department during fiscal 1980. During Kehoe's nine-year term as director (1969-78) the athletic department operated in the black. Kehoe came back with "a mandate, to balance the budget."

Whether he will leave having done so is a question still unanswered, according to Francis A. Gray, the assistant athletic director in charge of finances at College Park.

"Right now we're a little ahead for this fiscal year, our profits are slightly ahead of expenses," Gray said. "But it's much too soon to tell if any of the deficit will be eliminated by the end of the fiscal year."

Kehoe, reached at the Atlantic Coast Conference winter meetings on Kiawah Island, S.C., said yesterday, "I was brought back last spring to help solve a financial crisis and I think by the time I leave I will have just about solved it.

"It is still too soon to tell how much of the deficit we will eliminate but I think by the time I present a budget for the fiscal year in June we will be able to get most of the problem solved.

"I came back because Maryland got caught short. I've worked here for 43 years and was a student for four years before that. Anytime this school needs me, I'll try to help. But right now, I want to spend some time with Barbara Kehoe (his wife) while I've still got the chance and the time to do it."

The search committee originally formed to name a successor to James has never been disbanded and will now meet again. Two names certain to come up are Bill McHenry, currently athletic director at Washington and Lee University, and Al Paul, long the athletic director at Columbia University.

Neither Jerry Claiborne, the school's football coach, nor Lefty Driesell, the basketball coach, is expected to be a candidate. Both men want to continue coaching and the school has never considered combining the athletic directorship with a coaching job. It is not expected to do so now.

Kehoe came to Maryland as a student in 1936. He was a track all-America, graduating in 1940. He joined the Marines in 1941 and achieved the rank of colonel. He returned to Maryland in 1946 and was track coach for 23 years. During that time his teams dominated the ACC, winning 31 of 32 ACC indoor and outdoor titles over a 16-year period while going undefeated in dual-meet competition for nine years.

He took over an athletic department that was struggling financially, particularly in football and basketball. He hired Claiborne and Driesell as his football and basketball coaches and each man promptly turned a loser into a winner, helping to put the program in the black.

Kehoe retired in 1978 after a dispute with Chancellor Robert L. Gluckstern but never left the Maryland payroll. He remained as an adviser to President John Toll and became athletic director at Maryland-Eastern Shore during a budget crisis there in 1979. He solved that program by eliminating the football program and tightening belts considerably.

When James decided to leave last May, the Board of Regents turned again to Kehoe, not wanting to dump the sizable deficit into a new man's lap. Additionally, because of the deficit, the job was not a terribly attractive one. Now, because of Kehoe's work, school officials hope there will be more interest in the job.

"I think this job is a great opportunity, thanks in large part to the work of Jim Kehoe," Peter O'Malley, chairman of the board of regents said yesterday after the resignation was announced in the Diamondback, the Maryland student newspaper. "He made a significant contribution to this university the first time he was here, but perhaps an even more significant contribution this time."

Claiborne, who has been close to Kehoe over the years, said yesterday he was sorry to see Kehoe leave, adding that he hoped his successor would have some kind of football background.

Driesell has often said that he would like to see his old friend, former promotions director Russ Potts, return as athletic director. The last time Kehoe retired, in 1978, he did so one day after Potts resigned to become athletic director at Southern Methodist University. This time Kehoe's retirement became public one day after Potts left SMU to take a job with the Chicago White Sox.

Kehoe has long been known for his flamboyant style, including his loud sport coats, and aggressive personality. Kehoe always made his position on a subject very clear, whether it was his opposition to a performance of "Hair" in Cole Field House or his trepidation over Title IX, the legislation aimed at giving women's athletic programs equal funding. Kehoe has always maintained that, while the concept of Title IX is sound, its execution would create financial havoc for the nation's colleges.

It was that kind of havoc that brought Kehoe back to Maryland's 23-sport, $4.5 million athletic program last spring. Yesterday he said he will not recommend a successor and has no interest in serving on the search committee for a new athletic director. He also said he does not plan ("for now") to remain on in any part-time position.

"I will be glad to remain on and help the new man in a transition period if asked," he said. "But right now I just want to put together a budget that will put this program back on solid footing. Then I'll be around to tie up any loose ends. I have no intention right now of cutting back on any of our sports or programs. I think with good management we can put this thing together with little consolidation and reorganization without having to cut back in any way."