Adm. James A. (Ace) Lyons Jr., the Pacific Fleet commander whose outspokenness put him at the center of numerous controversies, has been pushed out of his job by disgruntled senior officers, according to Pentagon sources.

The Defense Department announced this week that Lyons, 59, a four-star admiral, plans to retire Oct. 1 after more than 35 years on active duty.

But department sources said Lyons, a close friend of former Navy secretary John F. Lehman Jr., was forced to resign by high-ranking Defense Department and Navy officials as the result of long-building animosities.

"It's the revenge of the nerds," said Lehman of the move to oust Lyons.

"He found his position untenable," one Defense Department official said. "He had not followed directions . . . . The decision to leave was one he made, but one he had to make."

Lyons most recently has been critical of the Pentagon's handling of the Persian Gulf escort operations. Lyons argued that he should have played a larger role in decisions about the operation because many of the ships used in the Middle East, including an aircraft carrier group, were drawn from the fleet under his command.

Defense Department sources said the decision to urge Lyons to leave the post he has held since 1985 was orchestrated by the highest-ranking officials of the Pentagon, including Adm. William J. Crowe Jr., chairman of the Joint Chiefs of Staff, Adm. Carlisle A.H. Trost, chief of naval operations, and Navy Secretary James H. Webb Jr. Sources said those officials became involved because of growing friction between Lyons and his immediate commander, Adm. Ronald J. Hayes, chief of the Pacific Command.

Lyons, who is visiting South Korea, could not be reached for comment yesterday.

The Pentagon announced that Vice Adm. David E. Jeremiah, director of Navy program planning, has been nominated by President Reagan to replace Lyons.