Thirteen midshipmen accused of drug violations last spring have been expelled by the U.S. Naval Academy, marking the most midshipmen ever expelled in a single drug incident.

The action, ordered by the secretary of the Navy last week and announced today, came after a five-month investigation.

Whether criminal charges will be pursued "is up to civilian authorities," according to academy spokesman Denis Boxx. He said that although the academy will not make public the names of those expelled, the school "would cooperate" if prosecutions are intitated.

A total of 38 midshipmen was investigated after school authorities learned last April that some students were using or selling up to three pounds of marijuana. One of the suspects also was accused of selling eight tablets of the barbiturate Quaalude.

Twenty-one of the 38 have been cleared, and investigations are continuing concerning four more, Boxx said.

Among those cleared were seven of eight members of the June graduating class, who were barred from taking part in the commencement. They subsequently were commissioned and have reported for active duty. The eighth member of the class of 1979 is one of the four still under investigation.

Of the 13 expelled, all males, two would have been seniors this fall and 11 would have been juniors.

Rear Adm. William P. Lawrence, the academy superintendent, said recently in a talk about drug use by midshipmen, "We are going to maintain impeccable standards because we feel that those who will lead the fleet have to measure up in this respect."

Academy regulations stipulate that "the unauthorized use, possession or willful involvement with marijuana, narcotics or other controlled substances constitutes a serious breach of both Navy and Naval Academy regulations and normally results in separation from the academy."

Two other midshipmen were expelled last year, bringing the total of drug-related expulsions for the academic year to 15 so far, equalling the number dismissed for drug abuse in 1971-72, the previous record year.