The Environmental Protection Agency was shaken yesterday when the second of two associate administrators quit the top-level posts created by EPA administrator Anne M. Gorsuch shortly after her appointment by President Reagan.

Frank A. Shepherd, 35, who has been in the agency only since late June, left with a letter telling Gorsuch "that my talents could be better used in private enterprise." Nolan Clark resigned Wednesday over what he termed "irreconcilable differences of style between myself and the administrator."

"It's putting it mildly to say the agency is in disarray," said an EPA official who asked not to be identified.

Shepherd, inexperienced in environmental law when he left a Miami law firm to supervise a staff of more than 100 EPA lawyers, was associate administrator for legal counsel and enforcement. Clark was associate administrator for policy and resource management.

Shepherd refused to go beyond his letter which, as is common in such situations, mentioned unspecified "personal reasons" and the "pleasure" of having worked with Gorsuch. She was unavailable for comment, having left Thursday on an unannounced Western trip.

Shepherd created a flap in August, when he held meetings with three industry groups at which he reversed EPA's position on some controversial regulations for hazardous-waste permits and tentatively agreed to settle a court challenge on terms favorable to industry.

He excluded Justice Department and EPA lawyers assigned to the case, leading Justice lawyer Nancy Long to withdraw in protest.

Sources including the agency official and a private environmental lawyer said Shepherd tired of bureacratic infighting and of alleged "back-stabbing" by key underlings hired by Gorsuch before he took office.

No "ideological incompatibility" existed between Gorsuch and either Shepherd or Clark, one of the sources said, adding that both men, whom she had not known before appointing them, turned out to be too "cautious" and "deliberative" to fit in with her "hip-shooter" operating style.

In addition, the source said, Gorsuch perceived them as "captives" of the career staff.

Another source said the resignations reinforce the image of Gorsuch as "hard to work for." In addition, the source said, Shepherd was "very much out of his league."