When companies whose shares you own decide to move corporate offices, it can trigger a taxable event for you if it is a redomestication transaction. Those are moves from the USA to foreign countries. Uncle Sam says, "You can go, but I want tax on all the profits you and your shareholders earned while you were a US company."
Notable recent examples of this include the spinoff/redomestication of DE Master Blenders 1753 NV from Sara Lee Corp, the Noble Drilling move to the Cayman Islands, and Aon Corp's relocation to London.
The company must pay US corporate tax on all undistributed earnings and profits at the time of departure from US shores. This is an incentive for the companies to make special dividend distributions at the time of change of domicile, such as the $3.00 special dividend paid by Sara Lee.
The shareholder must pay US capital gains tax on all unrealized appreciation up to the date of the change in domicile. This is computed by taking the fair market value of the shares on the date of the move and subtracting your cost basis.