The first black to hold citywide elective office in St. Louis has been indicted by a federal grand jury on charges of racketeering, lying to a grand jury, obstructing justice and filing three false income tax returns.

Sheriff Banjamin L. Goins said yesterday he is innocent and intends to remain in office and continue his congressional campaign to unseat William L. Clay (D-Mo).

Goins' first citywide elective office came when he became license collector in late 1968.

He resigned last June to run for sheriff, and is regarded a major power in Democratic Party politics in St. Louis.

His alleged links to Raymond L. Scharf, a former St. Louis vending machine operator serving a 10-year federal prison sentence for tax evasion and threatening a business rival, has been under investigation for years.

The indictment, made public late Tuesday, alleges that Goins received $20,000 in bribes from Scharf and that he used the money to buy a hidden interest in a now-defunct St. Louis tavern.

If convicted on all six counts, Goins would face a maximum sentence of 39 years and fines of $55,000.

Goins maintains that the investigation and charges against him are politically motivated.

The indictment was the second in 13 months to be brought in U.S. District Court here against a major St. Louis Democratic politician.

In March 1977 a federal grand jury indicted the former speaker of the Missouri House, Richard J. Rabbitt, on 15 charges of fraud and extortion.

Last summer, Rabbitt was convicted on all 15 counts and was sentenced to seven years in prison. He is appealing the conviction. U.S. District Court Judge John F. Nangle, who presided over the trial, also is scheduled to preside over Goins' trial.