Extending its television broadcast and digital rights to the games will cost ESPN $5.6 billion, roughly $700 million a year, starting in 2014, Reuters notes.
At that price, the new deal marks a record for baseball game rights and means ESPN will be paying almost twice the $356 million it currently pays to the MLB each year.
ESPN will retain its rights to run MLB content on both its TV networks and Internet platforms, including Watch ESPN, which transmits content to mobile devices like smartphones and tablets.
Despite the high costs, sporting events represent a huge profit source for media companies since viewers tend to watch games in real time and thus cannot skip commercials, boosting the prices that advertisers are willing to pay to run ads during big league events.
Shares of Disney rose fractionally in Wednesday morning trading.