Halep had to win the title in Rome to have any chance of returning to the top of the rankings, but teenager Vondrousova beat the French Open champion 2-6 7-5 6-3 in the second round.
No.3 seed Halep called for treatment on her hamstring before 19-year-old Vondrousova completed a fightback to move into the third round.
Vondrousova also defeated the Romanian in the last 16 at Indian Wells in March.
US and Australian Open champion Osaka defeated Dominika Cibulkova to set up an encounter with Mihaela Buzarnescu later in a hectic day at the Foro Italico after no play was possible on Thursday (AEST) because of rain.
Osaka was the No.21 seed at Roland Garros last year and lost to Madison Keys in the third round.