Secretary of State George P. Shultz, charging that Congress has "brutalized the foreign affairs budget," yesterday announced the closing of two embassies in Africa as part of sweeping cost-cutting measures triggered by congressional budget cuts.

In a speech to department personnel, Shultz said he expects the department's share of the $19 billion foreign affairs budget request for fiscal 1988 to be $84 million less than it needs this year and that he must substantially reduce the department's operations by eliminating jobs here and in diplomatic posts abroad.

As a result, he announced plans to close the embassies and 13 consulates, reduce the functions of several other embassies, eliminate some operational bureaus within the deparmtent and substantially reduce senior and mid-level positions in Washington.

Shultz did not detail how the cuts would be made. But State Department sources said up to 1,300 Foreign Service and civil service jobs will be eliminated, mostly in Washington, by attrition and early retirement incentives. But, they added, if that doesn't work, a reduction in force will be imposed.

Shultz said 21 of the coveted, so-called "seventh-floor" positions will be cut from his staff, and those of the deputy secretary and undersecretaries. The seventh floor is where Shultz and his top deputies have their offices.

In addition, the sources said, the number of deputy assistant secretaries of state -- the first rung on the department's senior-management ladder and the traditional stepping stone to an ambassadorship -- will be trimmed so that none of the 14 bureaus within State will have more than three. At present, most bureaus have four to six deputy assistant secretaries.

The sources said that such cutbacks will sharply decrease promotion chances into the senior ranks and are certain to create a severe new erosion of morale in the Foreign Service, whose members already are unhappy with a rigid, new up-or-out promotion system and the Reagan administration's choice of political appointees for many ambassadorships and senior policy positions.

Slated for closure are the U.S. embassies in two small African countries: Equatorial Guinea and the Comoro Islands. Thirteen consulates were closed last year, and the sources said that 13 more are being identified for closure.

They said that many closings will be in countries where there is more than one consulate. As one source put it, "We are asking our embassy in Paris whether they want to give up Marseilles or Bordeaux, whether the embassy in Canada would rather lose Quebec or Calgary and so forth."

The austerity move is caused partly by the Gramm-Rudman-Hollings budget law. Congress also refuses to vote more money for foreign policy while the administration insists on cutting popular domestic programs and refuses to trim defense spending.

The department estimates that it needs $1.7 billion to operate at present levels in fiscal 1988, But Ronald I. Spiers, undersecretary for management, said it anticipates getting only $1.6 billion. He noted that the cuts alluded to by Shultz cover only $59 million of the anticipated $84 million shortfall, and he said that still more cuts will be required to make up the difference.