WASHINGTON--A federal judge dismissed Qatar from a lawsuit filed by prominent Republican donor Elliott Broidy, who claims the tiny Persian Gulf nation was behind the hacking of his emails last year.

Mr. Broidy sued Qatar and agents of the country in March, shortly after news publications wrote about the contents of his hacked emails.

He accused...