ESPN has hired former Red Sox and Dodger infielder Nomar Garciaparra as a commentator for ESPN’s baseball broadcast team — mainly on “Baseball Tonight,” as well as on occasional games.

The news came simultaneously with Garciaparra’s retirement as a player Wednesday.

“I love talking about the game,” Garciaparra said, “and I think I found myself just within the last couple of years, when I got more in that utility role at the end of the career … here I was just talking the game and trying to pass on this knowledge. Here’s another way to pass that on as well.

“I go in there with an open mind knowing that it’s not easy,” he added.

Garciaparra won the 1999 and 2000 American League batting titles and seemed on track for the Hall of Fame, but the 36-year-old was plagued by injuries in recent years. In his final season last year with Oakland, he started 35 games.