The Treasury Department said it would sell $18 billion of American International Group Inc. stock in a public offering, slashing its stake by more than half and making the government a minority shareholder for the first time since the financial crisis was roaring in September 2008.

The sale will mark a step that seemed hard to imagine four years ago, when the New York insurer was effectively nationalized as part of a controversial financial-industry bailout. The U.S. will move closer to recognizing a profit on its largest...