WASHINGTON—Attorney General Loretta Lynch said Wednesday that she is closing the investigation into Hillary Clinton’s handling of classified information while she was secretary of state, officially ending the yearlong legal drama that had threatened the presumptive Democratic nominee’s bid for the presidency.

The nation’s top law-enforcement official said in a statement that she had met with Federal Bureau of Investigation Director James Comey and the career prosecutors and agents who had investigated Mrs. Clinton’s use of...