There have long been concerns that the biggest corporations do not pay enough tax in developed nations.
Tech giants have been criticised for reporting lower profits in high-tax countries and higher profits in lower-tax jurisdictions to minimise their tax burden.
In a securities filing, Microsoft said the IRS was seeking an additional tax payment of $28.9bn plus penalties and interest.
The company said it had "always followed the IRS's rules and paid the taxes we owe in the US and around the world".
It said it believed that any taxes owed after the audit would be reduced by up to $10bn based on tax laws passed by former President Donald Trump.
Other American tech firms such as Amazon and Facebook have also faced similar calls to pay more taxes.
This year, Microsoft has also come under scrutiny from other US authorities.
But the firm may soon have a victory over its plan to buy Activision Blizzard, which makes Call of Duty, for $68.7bn as the deal is expected to be finalised soon.