ESPN said anchor Maria Taylor is leaving the network after the two sides failed to reach an agreement on a contract extension.

Her departure comes after a report that a colleague criticized her role in NBA-related programming.

In a statement, Ms. Taylor thanked executives and colleagues at ESPN. “Words are inadequate to express my boundless appreciation, and I hope to make them proud,” she said.

Ms. Taylor had been anchoring ESPN’s recent coverage of the National Basketball Association Finals. With the final telecast of that series on Tuesday night—when the Milwaukee Bucks triumphed over the Phoenix Suns—her last assignment was completed.

“Maria’s remarkable success speaks directly to her abilities and work ethic. There is no doubt we will miss Maria, but we remain determined to continue to build a deep and skilled talent roster that thoroughly reflects the athletes we cover and the fans we serve,” said ESPN Chairman Jimmy Pitaro.

Ms. Taylor’s exit comes after the New York Times reported early this month about a recording of a phone call last year by Rachel Nichols, another ESPN personality, who complained that the job of anchoring “NBA Countdown” telecasts had gone to Ms. Taylor instead of her.

ESPN continued to pursue a new deal with Ms. Taylor after the Times published its article, with the network offering to extend her contract at between $2 million and $3 million a year, according to a person familiar with the matter.

“I wish Maria Taylor all the success in the world,” Ms. Nichols said in the July 2020 call, according to the Times. “If you need to give her more things to do because you are feeling pressure about your crappy longtime record on diversity—which, by the way, I know personally from the female side of it—like, go for it. Just find it somewhere else. You are not going to find it from me or taking my thing away.” Ms. Nichols is white; Ms. Taylor is Black.

Ms. Nichols apologized for her remarks on air during “The Jump,” the show that she hosts, saying she was “deeply sorry” for hurting Ms. Taylor.

In her statement, Ms. Taylor didn’t comment on the public fallout from the recording of Ms. Nichols.

Write to Benjamin Mullin at Benjamin.Mullin@wsj.com