A senior FBI official overseeing a government task force that addresses Russian attempts to meddle in U.S. elections has left the government for a job in the private sector, a departure that comes just months ahead of the 2018 midterm contests.

Jeffrey Tricoli had been coleading the FBI foreign influence task force until June, when he left government work for a senior vice president job at Charles Schwab Corp., the company confirmed.

Mr....