Senior Carter administration officials said yesterday the deposed shah of Iran decided on his own to leave Panama and go to Egypt for surgery and insisted that the move should not affect the fate of the American hostages in Iran.

President Carter's national security affairs adviser, Zbigniew Brzezinski, and White House press secretary Jody Powell insisted that Mohammad Reza Pahlavi and his doctors had made the decision to go to Egypt for removal of his spleen after concluding that satisfactory arrangements for the surgery could not be made in Panama.

The American doctors whose efforts to operate on the shah in Panama were frustrated by political wrangling announced last night that they will go to Egypt shortly to perform the surgery there. The medical team is headed by Dr. Michael DeBakey, the Houston cardiac surgeon, and Dr. Benjamin H. Kean, of New York Hospital-Cornell Medical Center.

"I am still the shah's physician, and Dr. DeBakey is still his surgeon," Kean said, adding that the team's departure is "already arranged."

Brzenzinski, in a brief talk with reporters at the White House, contended that the former shah could have come to the United States.

"We discussed with him various options, and we did not exclude the option of his obtaining medical assistance in the United States, which is something that we had promised earlier. Under the circumstances, the shah decided himself that his welfare would be best served if he went to Egypt, and accepted their invitation, which had been issued earlier," Brzeinski said.

He also insisted that the Carter administration did not expect the shah's sudden departure yesterday to cause complications for the U.S. effort to free the 50 Americans held hostage in the American embossy in Tehran since Nov. 4 by Iranian militants demanding that the shah be returned to stand trial for alleged crimes.

"There should be no connection whatsoevery between the illegal dentention of captives and the physical well-being of the shah. . . . It is a compassionate problem, not a political problem," Brezinski said.

However, that public posture clashed directly with what is known to be the private attitude of administration officials.They are known to feel that had the shah been readmitted to this country, that would have triggered an emotional new outburst of anti-American feeling in Iran and strengthened the hand of militant forces opposing efforts to resolve the hostage crisis.

That concern is understood to have caused the administration to resist pressure from American friends of the deposed monarch to allow him to return here or even go to a U.S. military hospital in Panama for surgery. Instead, the administration privately took the position that satisfactory medical arrangements could have been made in Panama.

However, that hope was frustrated when DeBakey and the American doctors, whom the shah wanted to perform the surgery, found the arrangements in Panama unacceptable. The precise nature of the dispute has not been revealed publicly, but it is understood to have centered on Panamanian unwillingness to allow DeBakey to play more than a consultant's role in the surgery or to bring in the medical support team that he considered necessary for successful surgery.

In an effort to resolve the dispute, Carter sent a top-level U.S. official team headed by White House chief of staff Hamilton Jordan and presidential counsel Lloyd Cutler to Panama last week to negotiate with the shah and Panamanian authorities. But, for reasons that were still unclear last night, the U.S. attempt to mediate failed, and the shah elected to accept the invitation of his old friend, Egyptian President Anwar Sadat.

Although U.S. officials last night reiterated their past assertions that the shah had made no request to return to the United States, they dodged questions about whether the administration had exerted any pressure to keep him from asking to come back.

Powell, while conceding that DeBakey and other American specialists had advised that the shah's spleen must be removed, said only that "it was not possible to arrange surgery under circumstances satisfactory to all parties in Panama."

He added: "We were committed to assist the shah in the event of a medical emergency, including the possibility of returning for emergency private medical treatment to the United States. But the shah, in consultation with his physicians, chose to go to Egypt."

Dr. Kean, a specialist in tropical medicine who went to Mexico last October to arrange the shah's admission to a New York hospital, said in a telephone interview yesterday that when the American medical team goes to Egypt it will be "to cooperate with the physicians in charge in that country in a harmonious spirit."

The shah has a badly enlarged and inflamed spleen. The condition is believed to have been caused by a spread of the lymph gland cancer for which he was treated in New York, but the doctors treating him have said they cannot determine his precise condition, and future outlook, until they can operate.

After the revolutionary turmoil in Iran forced him to leave early last year, the shah made brief stays in Egypt, Morocco and the Bahamas, then took up residence in Mexico before his cancer problem forced the reluctant Carter administration to bow to pressures from teh shah's American friends and allow him to enter the United States.

His departure for Panam in December was arranged by the United States in hopes that it would help to defuse the crisis over the hostages. But on Saturday, Iranian Foreign Minister Sadegh Ghotbzadeh charged that he shah's U.S. friends, including former secretary of state Henry A. Kissinger and David Rockefeller, chairman of the Chase Manhattan Bank, were plotting to get him out of Panama before today's formal deadline for Iran to present an extradition request to Panamanian officials.

Kissinger could not be reached for comment last night. However, CBS television news quoted him as saying that reports of his involvement in the shah's departure were "wrong."