Tim Cook was angry.

It was May 2013, and Mr. Cook, the chief executive of Apple, appeared before a United States Senate investigative subcommittee. After a lengthy inquiry, the committee found that the company had avoided tens of billions of dollars in taxes by shifting profits into Irish subsidiaries that the panel’s chairman called “ghost companies.”

“We pay all the taxes we owe, every single dollar,” Mr. Cook declared at the hearing. “We don’t depend on tax gimmicks,” he went on. “We don’t stash money on some Caribbean island.”

True enough. The island Apple would soon rely on was in the English Channel.

Image Tim Cook, Apple’s chief executive, at a Senate hearing in May 2013 on the company’s tax strategies. Credit... Andrew Harrer/Bloomberg, via Getty Images

Five months after Mr. Cook’s testimony, Irish officials began to crack down on the tax structure Apple had exploited. So the iPhone maker went hunting for another place to park its profits, newly leaked records show. With help from law firms that specialize in offshore tax shelters, the company canvassed multiple jurisdictions before settling on the small island of Jersey, which typically does not tax corporate income.