The French driver had been a part of the Enstone team before, holding a reserve driver role back in 2016.
Renault team principal Cyril Abiteboul said the team was ready carry on its progress with Ocon after a difficult campaign in 2019 so far.
“We are very happy to work with Esteban for the next two seasons,” Abiteboul said.
“Over his F1 career Esteban has experienced the highs and lows of the sport, and fully understood the need to seize every possible chance.
“In addition to lending his natural talent, Esteban’s aim will be to focus his natural energy and drive, both of which have been intensified by a year away from racing. It is then up to us to infuse them into the next phase of the team’s progress.
“He has shown his ability to score points, has great professionalism on and off the track, plus his recent experience as reserve driver to the current world champions will be a valuable asset to the development of our entire team.”
The deal leaves Nico Hulkenberg without a race seat for 2020, but rumours have linked the German with a potential switch to Haas in place of Romain Grosjean.