One of Expedia’s top techies came up with a get-rich-quick scheme — and it had nothing to do with booking low-priced holiday travel on his company’s Web site.

Jonathan Ly, a former IT specialist at the travel-booking company’s San Francisco office, used his office computer and laptop to hack into two executives’ e-mails — and then gleaned inside information on upcoming quarterly results and used it to book illegal profits, federal prosecutors charged on Monday.

Ly pleaded guilty to criminal insider-trading and hacking charges on Monday.

Ly pocketed nearly $350,000 in ill-gotten profits over three years, court papers filed in a Seattle federal court allege.

The Bay Area man will pay back more than $375,000 as part of the settlement of a separate civil suit filed by the Securities and Exchange Commission.

The 28-year-old techie-gone-wrong faces up to 25 years in prison for securities fraud, and is expected to be sentenced in February.

“The irony of our increasingly digital world is that the greatest threat to our networks is a human one,” Seattle US Attorney Annette Hayes said in a statement.

In 2013, four months after joining Expedia, Ly hacked into the e-mails and computers of Chief Financial Officer Mark Okerstrom, as well as its head of investor relations in order to get non-public information about upcoming quarterly earnings announcements, according to court documents.

Ly used that information to purchase both call and put stock options, it is alleged.

In one case, on July 25, 2013, after learning Expedia would report the very next day that it missed analysts expectations in the previous quarter, Ly purchased a put option — betting that the company’s shares would fall, prosecutors said.

The next day, Expedia reported results that missed analysts’ expectations by more than 10 cents a share. The stock fell in excess of 27 percent, and Ly was a winner.

Even though his trades were profitable, Ly made increasingly more brazen hacks as time went on, according to the Department of Justice.

In 2014, Ly hacked into a fellow IT employee’s computer to steal a password file, the SEC claims.

Ly then gained access to a special IT administrator service, which he wasn’t allowed to use, that enabled him to secretly read employees e-mails and access their corporate accounts.

The scheme was so lucrative — and Ly so brazen — that he continued to hack the employees with a company issued laptop that he kept after he left the company in April 2015.

A spokesperson for Expedia didn’t respond to a voicemail seeking comment.

The company’s stock rose 2.2 percent on Monday, to $123.69.