Microsoft has bought Romanian antivirus company GeCAD Software and will be embedding an antivirus engine in a future version of Windows.
The software giant will also start a subscription service for users to receive antivirus updates. Microsoft said it would introduce the service as soon as possible but could not set a date.
"This is part of our plan to re-engineer Windows to make it more effective at resisting viruses," said Hilary Wittmann, security marketing manager at Microsoft UK.
"We're already working with antivirus vendors to achieve this, and offering our own solution gives customers more choice. They can still use third-party antivirus software if they choose, or even both."
This is not the first time Microsoft has tried to build antivirus support into its operating systems.
In 1994 DOS 6 and Windows 3.1 had an antivirus engine, which was a cut down version of commercial software from Central Point Anti-Virus.
But the engine was bedevilled with virus update problems and was dropped when Windows 95 was launched.
Graham Cluley, antivirus specialist at Sophos, said: "We're not in the least bit worried.
"XP already has a firewall built-in and that market's still healthy. Microsoft's big test will come with the first serious virus outbreak.
"It will need trained technicians on the phones giving support and a fast team to keep up with the specialists."
It is expected that the bulk of staff at GeCAD will remain in Romania with a few transferring to Redmond.
Cotton seedling freezes to death as Chang'e-4 shuts down for the Moon's 14-day lunar night
Fortnite easily out-earns PUBG, Assassin's Creed Odyssey and Red Dead Redemption 2 in 2018
Meteor showers as a service will be visible for about 100 kilometres in all directions
Saturn's rings only formed in the past 100 million years, suggests analysis of Cassini space probe data
New findings contradict conventional belief that Saturn's rings were formed along with the planet about 4.5 billion years ago