ESPN will broadcast both games, with the action at Nationals Park scheduled to start at 7 p.m. ET and the Giants and Dodgers following at 10 p.m. ET.
Following opening night, 14 games will be played on July 24, including the first game at the Texas Rangers' new Globe Life Field as they host the Colorado Rockies.
Over the 60-game regular season, teams will play their four divisional opponents 10 times each, and the other 20 games will be against interleague opponents in the same geographical area. For example, National League West teams will face American League West teams.
The Opening Day matchup between the Yankees and Nationals could serve as Gerrit Cole's debut in pinstripes. Cole and the Yankees agreed to a record nine-year, $324 million contract this past winter.
Highlights later in the season include Madison Bumgarner's return to San Francisco when the Arizona Diamondbacks face the Giants Aug. 21-23.
Oakland Athletics pitcher Mike Fiers will get his first look at his former Houston Astros teammates on Aug. 7 at theRingCentral Coliseum. Fiers blew the whistle on the Astros sign-stealing scandal, which dominated baseball talk throughout the winter before the coronavirus shut down the sport.
The season ends Sept. 27, with all 30 teams starting their games at 3 p.m. ET to allow for a final-day playoff scramble. Most games this season, however, are at night.
The Boston Red Sox will face a challenge early in the season, as 13 of their first 23 games are against a pair of AL East contenders: the Yankees and Tampa Bay Rays.
The Yankees have more room for error early in the season, as all but three of their final 23 games are against teams that lost 95 games or more last season: 10 against the Toronto Blue Jays and seven against the Baltimore Orioles before they finish with three against the Miami Marlins.
The other three games in that stretch are the Yankees' only ones at Fenway Park against the Red Sox, Sept. 18-20. Boston will play at Yankee Stadium seven times in the first half of its schedule.
The Dodgers, among the favorites to win the World Series, will not play the Giants in September and finish with six interleague games at home against the A's and Los Angeles Angels.
"Seeing the schedule makes it a little more real," Reds manager David Bell said. "We can all start to plan a little better, have an idea what our life is going to be like and where we're going to be the next several months.
"It will make it more realistic: Hey, this is about to happen in just over two weeks now."
Although the All-Star Game and games planned for London, Mexico City and Puerto Rico have been canceled, the St. Louis Cardinals will still take on the Chicago White Soxon Aug. 13 next to the "Field of Dreams" cornfield outside Dyersville, Iowa.
Jackie Robinson Day, usually celebrated April 15, will be Aug. 28. That's the date Martin Luther King Jr. led the March on Washington in 1963 and the date Brooklyn Dodgers owner Branch Rickey talked to Robinson in 1945 about a future in the majors.
The 100th anniversary of the Negro Leagues will be celebrated Aug. 16, and Roberto Clemente Day will be Sept. 9.
The Associated Press contributed to this report.
Besides the Yankees and Dodgers, who can win it all in 2020?
Doug Glanville breaks down which teams, besides the Yankees and Dodgers, have the right makeup to perform well in a shortened season and win the World Series.
Judge and Cole back at it inside Yankee Stadium
Yankees ace Gerrit Cole works out on the mound, facing a couple of hitters, including Aaron Judge.