President Carter has called Gen. Andrew J. Goodpaster out of retirement to run the U.S. Military Academy at West Point, the Pentagon announced yesterday.

Army officials said Goodpaster, who was Supreme Allied Commander in Europe from 1969 to 1974, is the first general brought out of retirement to head West Point. He will succeed Lt. Gen. Sidney B. Berry as superintendent in June.

Army leaders, in pondering the best way to correct cheating and other problems that have erupted at West Point, decided to choose and officer who could serve at the academy for an indefinite period and not worry about advancing his own career.

These leaders also had been advised by the Borman Commission, which investigated cheating at the academy last year, to select a superintendent with an "interest in education and a demonstrated ability to provide educational and military leadership.

The commission, headed by former astronaut Frank Borman who is now head of Eastern Airlines, further recommended that the superintendent serve "a mimimum of five years" instead of the standard three years.

Former Army Secretary Martin Hoffman, present Secretary Clifford L. Alexander Jr. and Gen. Bernard W. Rogers, Army Chief of Staff, sifted through candidates before recommending Goodpaster to Carter. Rogers, according to defense officials, took the lead in championing Goodpaster.

Choosing a presigious retired military leader may set a precedent for all the service academies defense officials predicted.

Goodopaster, 62, retired from the Army in 1974 to make room for Gen. Alexander M. Haig, still a sore point among many career Army officers. Goodpaster currently holds the John C. West chair of government and international studies at the Citadel, a military college in Charleston, S.C.

A graduate of West Point, Goodpaster has a doctorate in international relations from princeton University. He was commandant at the National War College at Ft. McNair from 1967 to 1968.

Goodpaster will return to active duty at the rank of lieutenant general, with three stars. He was given four stars when he retired.