INDIANAPOLIS (AP) _ A federal grand jury is investigating whether Eli Lilly and Co. is complying with government rules covering the company's drug manufacturing operations, Lilly said today.

The company said in a statement it believes the inquiry stems from an agreement Lilly signed with the Food and Drug Administration in 1989 to improve quality control systems.

Lilly said the government hasn't questioned the safety or effectiveness of any of its drugs. The company said it is cooperating fully with the investigation, which is being done by a grand jury in Maryland, where the FDA is located.

''We believe that we have complied with the terms of the voluntary agreement and that our manufacturing quality systems are now among the best in the industry,'' said Robert H. Williams, vice president of corporate quality and environmental affairs.

In midday trading on the New York Stock Exchange, Lilly was off $1.50 a share at $50.37 1/2 .

In 1989, after a four-month investigation, the FDA issued a 90-page report detailing a variety of problems related to Lilly's manufacturing processes, documentation and quality control procedures.

The FDA said at the time that there were objectionable conditions in nearly every area of Lilly's Indianapolis capsule and tablet plant, including failure to have written standard operating procedures for many tasks and record- keeping problems.

Richard Bennett, the U.S. attorney for Maryland, declined to comment on the inquiry this morning. Fritz Frommeyer, a spokesman for Lilly, also declined to comment beyond the company's written statement.