Ireland's Sam Bennett (Bora-Hansgrohe) won the 159.4-kilometres stage from Koper to Kocevje.
Cavendish (Team Dimension Data) was ahead of a late crash which fractured the peloton, but was never in contention on the narrow finish as Bennett won.
The 32-year-old Manxman opted not to launch his sprint. The four-day race concludes on Sunday as Cavendish seeks to prove his fitness ahead of the Tour de France.
Tour of Slovenia
Majka outlasts Visconti to take stage three in Slovenia
The 30-times Tour stage winner was racing for the first time since the Milan-San Remo one-day race on March 18.
He was diagnosed with glandular fever, caused by the Epstein-Barr virus, in April and made a gradual return to training.
The Tour begins in Dusseldorf on July 1 and concludes in Paris on July 23, with Cavendish bidding to move closer to Eddy Merckx's record of 34 stage wins.
Cavendish is scheduled to race in the British Championships on the Isle of Man on June 25.
Stage One Results
1. Sam Bennett (Bora-Hansgrohe) 3:52:57
2. Sonny Colbrelli (Bahrain-Merida)
3. Luca Mezgec (Orica-Scott
4. Roberto Ferrari (Team UAE Abu Dhabi)
5. Marco Canola (Nippo-Vini Fantini)
6. Marco Pavlic (Slovenia)
7. Dusan Rajovic (Adria Mobil)
8. Andrea Palini (Androni Giocattoli
9. Rafal Majika (Bora-Hansgrohe)
10. Mark Cavendish (Dimension Data)