The feature has been rumored for some months and a test version was demonstrated by Joe Belfiore, a Windows Phone executive, at Microsoft's annual developer conference in San Francisco.
Read MoreMicrosoft reveals Siri-like Windows Phone feature
The Cortana service, which can take verbal instructions to search the Web, set alarms, make calls and a host of other actions, is still in beta testing, said Belfiore, but will soon be a standard feature on Windows phones.
Belfiore announced that the latest version of Microsoft's smartphone software, called Windows Phone 8.1, will be rolled out to consumers as a downloadable upgrade in the next few months, and new phones running the software will be in stores by late April or early May.
Microsoft also said on Wednesday it will give away its Windows operating system to makers of smartphones and small tablets as it seeks to grab a toehold in those fast-growing markets.
Microsoft's move, announced at the conference in San Francisco, is an attempt to broaden the small user base of mobile versions of Windows, in the hope that more customers will end up using Microsoft's cloud-based services such as Skype and Office.
Up to now, Microsoft has charged phone and tablet makers to use versions of its Windows system on devices, as it has done successfully for many years with Windows on personal computers.
Hardware makers factor the cost of that into the sale price of each device.