Northwestern will host Stanford in 2019 and 2021 and play on the road in 2020 and 2022.
Northwestern and Stanford have played six times, with their last meeting coming in 1994.
"We're thrilled to add another tremendous institution like Stanford to our future nonconference schedules," Northwestern athletic director Jim Phillips said in a statement. "Having Stanford on our future schedules, along with Notre Dame, Boston College, California, Syracuse and Vanderbilt, makes this an exciting time to be a fan of Chicago's Big Ten football team."
The Wildcats announced a two-game series with Notre Dame last week.
Scott Powers covers colleges for ESPNChicago.com.