A U.S. District Court judge here yesterday permanently enjoined a Washington investment adviser from violating antifraud provisions of federal securities law and ordered him to pay back more than $22,000 in what the Securities and Exchange Commission said were illegal profits.

The SEC charged that Guy O. Dove III, first vice president of Schroder Capital Management Inc., illegally used advance insider knowledge of the woes of Advent Corp. to sell stock at a profit shortly before the company announced that it might seek relief under federal bankruptcy laws.

According to the SEC, Dove was attending meetings of Advent's board and serving as a consultant to the board while management was seeking new funds and knew that those plans were falling apart.

Dove consented to the court order, issued by Judge Charles Richey, without admitting or denying the SEC's charges.

According to the SEC, Dove's involvement with the SEC began in July 1980, when he was approached by a director of the electronics manufacturing firm who wanted Dove as an investor. Advent, which has its principal offices in Portsmouth, produces stereo components, televisions and other audio and video products.

On March 4, 1981, company officials began drafting a press release announcing that Advent might file a Chapter XI proceeding if new money was not found.

On the same day, according to the SEC, Dove placed an order to sell 5,000 shares of Advent stock. The next day he arranged to sell 11,000 additional shares. All 16,000 shares sold for 2 5/8. Later in the day, after Dove sold his stock, trading in Advent stock was halted and the prospect of a bankruptcy filing surfaced.

Dove could not be reached for comment.