Several bottles, beverage cans and screws were placed on the tracks in Bietigheim (Rastatt district) by strangers.
An ICE was able to brake just in time, as the federal police announced on Tuesday.
Nobody was hurt, there was no harm.
The officials are investigating after the incident on Monday because of dangerous interference in rail traffic.