CHICAGO — J. Dennis Hastert, the former speaker of the House of Representatives, has been charged with lying to the F.B.I. and making cash withdrawals from banks in a way that was designed to hide that he was paying $3.5 million to someone for his “misconduct” from years ago, a federal indictment released on Thursday said.

Mr. Hastert, 73, the longest-serving Republican speaker, had worked as a lobbyist since leaving office. The indictment, announced by the United States attorney for the Northern District of Illinois, said Mr. Hastert, who was once a high school teacher and wrestling coach in Yorkville, Ill., had so far paid $1.7 million to the person, who had lived in Yorkville and had known Mr. Hastert for most of his or her life. Mr. Hastert worked in Yorkville from 1965 to 1981.

In 2010, during meetings between Mr. Hastert and the unnamed individual, the two discussed “past misconduct” by Mr. Hastert against the person, according to the indictment.

In those meetings and in later discussions, Mr. Hastert agreed to provide money to the person “in order to compensate for and conceal his prior misconduct,” the indictment said. It said he was structuring the cash withdrawals in increments designed to avoid bank reporting requirements. The indictment does not provide details of the misconduct.