Microsoft will invest 20 billion dollars (about 17 billion euros) in cybersecurity over the next five years.
That investment is four times what the software company had previously planned.
In addition, Microsoft is making $150 million available to help US governments keep their computer systems up to date.
Earlier in the day it was announced that US President Joe Biden has asked technology companies and financial institutions, among others, to do more on cybersecurity.
"It's a matter of national security," a senior government official said.
Biden spoke to the executives of Apple, Alphabet, Amazon, Microsoft and JPMorgan Chase on Wednesday.
The issue is high on the agenda in Washington.
Last month, a major cyber attack hit many hundreds of companies.
Ransomware was distributed through a program of the American software supplier Kaseya, a blackmail tool that encrypts computers or data, after which money is demanded.
JBS, the largest meat processor in the world, was previously hit by a cyber attack. Many slaughterhouses had to close then. The American oil pipeline company Colonial Pipeline was also a target. The attack caused a major oil pipeline in the United States to be temporarily shut down, causing shortages of gas at gas stations and soaring fuel prices.Keywords: