At 40%*, the United States has the second highest corporate tax rate in the world (UAE is #1 at 55%). it is also one of only two nations that I’m aware of (the other is Eritrea) that applies that rate extra-territorially. In other words, the US government applies that tax rate to all of a company's (or individual's) income no matter where it is earned, not just to that which is earned within the borders of the United States.
The first duty of a company's management is the fiduciary duty to maximize the return to its owners. It has no duty, patriotic or otherwise to pay more taxes than it is required to. The case law says so. In an opinion written by Second Circuit judge Learned Hand in the case Helvering v. Gregory in 1934 he wrote:
"Any one may so arrange his affairs that his taxes be as low as possible; he is not bound to choose that pattern which will best pay the Treasury; there is not even a patriotic duty to increase one's taxes."
If the US government wants to stop the wave of inversions that has been taking place it needs to make the US tax system more competitive with the rest of the world. Lowering the corporate tax rate would be a good start. Ending universal taxation as well would be even better. Trying to prevent companies from leaving will be futile.
*The corporate income tax rate is approximately 40%. The marginal federal corporate income tax rate on the highest income bracket of corporations (currently above USD 18,333,333) is 35%. State and local governments may also impose income taxes ranging from 0% to 12%, the top marginal rates averaging approximately 7.5%. A corporation may deduct its state and local income tax expense when computing its federal taxable income, generally resulting in a net effective rate of approximately 40%. The effective rate may vary significantly depending on the locality in which a corporation conducts business. The United States also has a parallel alternative minimum tax (AMT) system, which is generally characterized by a lower tax rate (20%) but a broader tax base.