Louis B. Nichols, 71, a retired top side to the late FBI Director J. Edgar Hoover, died Monday at the Miami (Fla.) Heart Institute where he had been under treatment for heart disease and cancer.

Mr. Nichols retired as assistant FBI director in November, 1957, after 23 years with the bureau. He then joined Schenley Industries, the liquor distiller, from which he retired in 1969 as executive vice president.

A native of Decator, III., Mr. Nichols was a graduate of Kalamazoo College and George Washington University Law School. He worked as assistant religious works director for the YMCA in Washington until he received a law degree in 1934 and joinend the FBI.

Mr. Nichols first assignment was in the Birmingham, Ala., field office. He spend all but his first years with the bureau in Washington.

As assistant director, he was the FBI's No. 3 man under Hoover and associate director Clyde. A. Tolson, and was in charge of the bureau's records and communications. In the late 1960s, he was mentioned often as a possible successor to Hoover, who remained director until his death in May, 1972.

Although the bureau had no such title officially, Mr. Nichols became known as the FBI's public relations man. He developed a reputation with the press for directness and reliability renowned for what some calculated as 90-hour work weeks.

After leaving the FBI, Mr. Nichols kept close ties to the organization. He was president of the J. Edgar Hoover Foundation, which he helped found in 1965 "to safeguard the heritage and freedom of the United States . . . to promote good citizenship . . . and to perpetuate the ideas and purposes to which . . . Hoover dedicated his life," according to the foundation's charter.

Mr. Nichols' ability as a public relations man helped the FBI reach a high level of popularity in an age when the public seldom felt the need to question its methods. Only two years ago, however, Mr. Nichols was one of two former assistant directors quoted in The Washington Post as saying the FBI kept exentive files on the personal lives of members of Congress. This and other allegations have brought the FBI's image under question.

After retiring from Schenley, Mr. Nichols maintened a residence at Marco Island, Fla., in addition to a home in Leesburg, Va. His family owns a black walnut trees farm near Winchester with about 42,000 trees, which a son described as one of the largest, privately owned black walnut farms in the country.

Mr. Nichols also was a director of the President Foundation of Valley Forge, Pa., and was an active member of the American Bar Association. A 32d degree Mason, he was a member of Kena Temple and the Scottish Rite Temple in Alexandria.

Mr. Nichols was a founder of the National College of District Attorneys at the University of Houston Law School.

Survivors include his wife, Carroll, of the homes, two sons, John Edgar, named after his later FBI director, of Leesburg, and Louis S., of Hamilton, Va.; a brother, John B., of Golden Meadous, La,; a sister, Jane N. Wiggins, of Virginia Beach, and a grandson.

The family suggests that contributions be made to the Louis B. Nichols memorial fund of the Marco Island United Methodist Church or to the J. Edgar Hoover Foundation.