WASHINGTON — The personal e-mail account of a State Department whis­tle­­blower was hacked, and four years worth of messages — some detailing alleged wrongdoing at the agency — were deleted, The Post has learned.

The computer attack targeted the Gmail account of Diplomatic Security Service criminal investigator Richard Higbie, his lawyer, Cary Schulman, confirmed.

“They took all of his e-mails and then they deleted them all,” said Schulman. He said that he could not prove who was responsible for the hack job, but said the attack was “sophisticated” and called the targeting of Higbie “alarming.”

“Obviously, somebody is not happy with something he’s doing and wanted to get that information and also cause him an inability in the future to have ready access to that,” Schulman said.

The e-mails included evidence about misconduct by top officials at the department, communications with other potential whistleblowers there, and correspondence with members of Congress who are investigating the allegations, Schulman said.

They also include correspondence between Higbie and Schulman about legal strategy, the lawyer said.

Schulman said he could not provide details about the evidence deleted with the e-mails.

Higbie has asked the FBI in Dallas, where he lives, to investigate the hacking, which occurred this month.

Higbie played a key role in helping fellow whistleblower Aurelia Fedenisn, a former investigator for the department’s inspector general, reveal in June a pattern of alleged coverups by top department officials.

The alleged coverups included keeping quiet separate IG investigations that found that members of then-Secretary Hillary Rodham Clinton’s security detail had engaged hookers and that the Belgian ambassador had solicited underage prostitutes.

These were among a string of investigations by the service, responsible for protecting dignitaries and investigating crimes within the department, that were allegedly derailed by senior officials, including one instance of interference by Clinton Chief of Staff Cheryl Mills.

Since the revelations in June, the department again mostly swept the cases under the rug.

Higbie, a senior criminal investigator and the second-highest-ranking agent with the service’s Dallas office, also has an employment lawsuit against the department, alleging it retaliated against him.

The hacking of Higbie’s e-mail follows a mysterious break-in at Schulman’s Dallas law firm in July, shortly after the whistleblower allegations came to light.

The burglar sawed a hole through the wall from an adjoining office and stole three computers, but left behind other valuables.

Although cops arrested a petty thief for the crime, Schulman said, “We feel like we’re in a movie. It’s nuts. It makes us wonder . . . . maybe we’ve got something we don’t even realize or maybe they’re worried about something.”