LANSING, Mich. (AP) _ A state police narcotics investigator was arrested Friday and charged with keeping $4,000 worth of cocaine he bought undercover with state money.

Detective Trooper Gene Autry Ward, 32, faces nine felony counts, including four of larceny, the attorney general's office said.

A trooper for five years, Ward was assigned to the investigative services division. He was released on bond Friday after arraignment in district courts in East Lansing, where his office is, and Lansing, where he lives.

According to a complaint filed in East Lansing District Court, the four alleged drug buys with state money go back as far as September 1986 and ranged from $330 to $1,850. Ward was also accused of tampering with drug evidence in cases dating as far back as May 1986.

In all, $4,030 of state money is unaccounted for, according to the complaint.

In addition to the larceny counts, Ward was charged with one count of possessing the narcotic pentacozine, also known as talwin; and four counts of possessing less than 50 grams of cocaine.

Col. Ritchie Davis, the state police director, said he believed it was the first time a trooper had been arrested on felony charges.

He declined to comment on Ward's case in detail but said: ''We had no idea there was a drug problem. There was a personal problem and I don't think we should be commenting on those.''

Each narcotics possession count is a felony punishable by up to four years in prison and a $2,000 fine. Larceny is punishable by up to five years in prison and a $2,500 fine.