The financial details of the deal were not announced but the PGA's chief commercial officer Jeff Price told Reuters in August that the PGA Championship's move to May in a reshuffling of the golf calendar would add value to the major.
Instead of being the season's final major, the PGA Championship will now be the second, following the U.S. Masters.
Price said that research shows television viewership is 25 per cent higher in May than August.
CBS Sports, which first broadcast the event from 1958-1964 and has been the home of the PGA Championship since 1991, will continue to broadcast the third and final rounds on Saturday and Sunday, increasing its coverage by one hour each day.
ESPN and ESPN+ will carry live coverage of the first and second rounds.
The networks will provide a combined 175 hours of coverage across broadcast, cable and digital platforms.
"For nearly a half-century, CBS Sports has been a vital member of the PGA of America extended family while delivering our major championship to golf fans across the country," PGA chief executive officer Seth Waugh said in a statement.
"We are also thrilled to partner with ESPN and connect with sports fans through the reach of the ESPN networks.
"The PGA is a major that not only typically delivers the strongest field in golf, but is synonymous with historic moments that resonate with golf fans everywhere.
"As we move this iconic championship to May, we are extremely excited that CBS and ESPN will present the highest-quality product with the state-of-the-art technology through a broadcast team that shares our mission to grow the sport of golf."
Next year's PGA Championship will run from May 16-19 at Bethpage Black in Farmingdale, New York before the new agreement starts in 2020 when the major will be held at Harding Park in San Francisco.
(With inputs from agencies.)