The four opposition lawmakers, who included the leaders of Odinga's faction in both houses of parliament, were arrested and charged with unlawful assembly in late March, then released on bail.
"The case has been withdrawn ... for the sake of peace, dialogue and justice between the accused persons and the state," lawyer Danstan Omari told Reuters.
Thousands took part in three marches over the past two weeks against soaring prices and alleged fraud in last year's vote. All three turned violent and a fourth march had been planned for Monday.
Ruto said on Twitter he had asked the leaders of both houses of parliament to give priority to addressing all the issues the opposition had raised.
"We are convinced the issues shall be conclusively handled by Parliament in order to allow us focus on our economic transformation program," the president added.
The U.S. Embassy in Kenya and regional bloc the Intergovernmental Authority on Development (IGAD) joined local leaders in welcoming the move to talks.