By Sarah E. Needleman

Microsoft Corp. said it is shutting down its live-streaming service Mixer and working to move its community of broadcasters and viewers over to Facebook Inc.

The move puts an end to Microsoft's more-than-three-year battle for market share with the biggest names in the technology industry, including Amazon.com Inc.'s Twitch, Google's YouTube and Facebook's gaming unit.

Microsoft has struggled to keep pace with the growth of videogame streaming -- which is big part of Mixer's business -- even after poaching top streamers, including Tyler "Ninja" Blevins and Michael "Shroud" Grzesiek from Twitch last year, and ramping up marketing.

Microsoft said Mixer will operate through July 22 and after that traffic to Mixer's website will be redirected to Facebook Gaming.

"It became clear that the time needed to grow our own live-streaming community to scale was out of measure with the vision and experiences that Microsoft and Xbox want to deliver for gamers now," Microsoft said Monday in a blog post.

Terms of the deal with Facebook weren't disclosed. In a statement Facebook said it was proud to welcome the Mixer community to its gaming unit.

A Facebook spokesman said the transition isn't a sale and that it isn't acquiring any of the Mixer's code, technology, servers or employees. Mixer broadcasters will have the ability to join Facebook, where it will match partner agreements "as closely as possible" or stream from other platforms, the spokesman said.

Microsoft bought Beam, a service built by a small startup, in 2016 for an undisclosed sum and rebranded the offering as Mixer in 2017. Microsoft was late to the streaming party, which was already dominated by Twitch and YouTube. Amazon purchased Twitch in 2014 for about $842 million in cash.

In April people spent 37.1 million hours watching content on Mixer, compared with viewers spending more than 1.49 billion hours on Twitch, 461 million hours on YouTube Gaming and 291 million hours on Facebook Gaming, according to estimates from StreamElements, a provider of streaming services for online broadcasters. Mixer's audience in April grew just 0.2% from a year earlier, while Twitch's roughly doubled and Facebook Gaming's tripled, StreamElements said.

Videogame streaming can be lucrative for the most-popular streamers, with opportunities to earn as much as $50,000 an hour, or more for partnerships with game publishers, plus advertising and subscription revenue from the platforms they broadcast on.

Microsoft "clearly missed the boat even after making considerable investments to get exclusive talent on the platform," said game-industry consultant Joost van Dreunen. "Passing it off to Facebook is a much better decision than continuing to chase a losing hand."

Facebook launched its game-streaming service in 2018 and folded it into the company's gaming app earlier this year.

Microsoft's shedding of Mixer comes as the company is preparing to launch a next-generation Xbox console later this year. Its chief rival, Sony Corp., is also planning to do the same for its PlayStation brand.

Write to Sarah E. Needleman at sarah.needleman@wsj.com