WASHINGTON — Even as Apple became the nation’s most profitable technology company, it avoided billions in taxes in the United States and around the world through a web of subsidiaries so complex it spanned continents and went beyond anything most experts had ever seen, Congressional investigators disclosed on Monday.

The investigation is expected to set up a potentially explosive confrontation between a bipartisan group of lawmakers and Timothy D. Cook, Apple’s chief executive, at a public hearing on Tuesday.

Congressional investigators found that some of Apple’s subsidiaries had no employees and were largely run by top officials from the company’s headquarters in Cupertino, Calif. But by officially locating them in places like Ireland, Apple was able to, in effect, make them stateless — exempt from taxes, record-keeping laws and the need for the subsidiaries to even file tax returns anywhere in the world.

“Apple wasn’t satisfied with shifting its profits to a low-tax offshore tax haven,” said Senator Carl Levin, a Michigan Democrat who is chairman of the Senate Permanent Subcommittee on Investigations that is holding the public hearing Tuesday into Apple’s use of tax havens. “Apple successfully sought the holy grail of tax avoidance. It has created offshore entities holding tens of billions of dollars while claiming to be tax resident nowhere.”