A long bitter dispute in the Food and Drug Administration has ended with the admonition of two top FDA officials and an unusual public apology to 12 present and former agency employees who claimed they had been harassed and ill-treated by their bosses.

The denouncement came yesterday when Dr. Donald Kennedy, the new FDA commissioner issued a "Dear Colleague" letter to all FDA workers to ex-complaints who said they were the targets of official harassment during the Nixon and Ford administrations because they were seen as adversaries of the pharmaceutical industry. The medical officers and consultants charged that the agency had pro-industry bias.

A special government investigate panel last April unpheld the complaints of the 12 FDA employees and recommended that the new leaders of the Department of Health, Education and Welfare and the FDA apologized and make amends.

Kennedy said yesterday that he has done that.

The commissioner told the 1,000 FDA employees that he apologized "on behalf of the entire agency" to the 12 complainants and has restored one of them, Dr. John O. Nestor, to his former position as a medical officer in the FDA's cardio-renal drug review division. Nestor was transferred from the division in 1972, in an action that created much dissension and hurt morale in the agency.

In a separate letter sent Oct. 21 to Nestor and his 11 co-complainants, Kennedy said: "I apologize to each of you for any personal discomfort you may have suffered as a consequence [of personnel abuses], and I assure you of my commitment to the guarantee of fair treatment to all FDA employees."