People shop in an Apple retail store in Grand Central Terminal, January 29, 2019 in New York City. Drew Angerer | Getty Images

The Securities and Exchange Commission on Wednesday charged a former Apple executive with insider trading. Gene Levoff, senior director of corporate law and corporate secretary until September, "traded on material nonpublic information about Apple's earnings three times during 2015 and 2016," according to the lawsuit filed Wednesday in the U.S. District Court of New Jersey. "Levoff also had a previous history of insider trading, having traded on Apple's material nonpublic information at least three additional times in 2011 and 2012. For the trading in 2015 and 2016, Levoff profited and avoided losses of approximately $382,000," the complaint says.

Levoff's position at Apple granted him insider access to not-yet-public earnings results and briefings on iPhone sales, the complaint says. On more than one occasion, he disobeyed the company's "blackout" period for stock transactions, selling or buying stock worth tens of millions of dollars, according to the SEC. The agency alleges he bought shares and profited when the stock popped after positive earnings reports, and sold to avoid downturns that followed poor results. Later on Wednesday, the U.S. Department of Justice announced it was charging Levoff with one count of securities fraud. He's set to appear in court on Feb. 20. In a statement to CNBC, Levoff's attorney Kevin Marino said, "We are reviewing the civil and criminal allegations against Mr. Levoff and look forward to defending him in both matters."