Major League Baseball’s streaming-technology unit is looking to break into the hot arena of competitive videogaming by partnering with the creator of one of the world’s most popular computer games.

The agreement, which was announced Friday, calls for MLB’s BAMTech to pay a minimum $300 million through 2023 to Tencent Holdings Ltd.’s Riot Games for the exclusive rights to stream “League of Legends” competitions.

BAMTech,...