Swift, who won gold for Great Britain in the men's scratch race at the world track cycling championships a month ago, had only just made the decision to switch from track to road in order to boost his Olympic hopes. The Giro would have been his first road race of the season.
The 24-year-old has been replaced in Sky's team for the Giro by veteran rider Jeremy Hunt. The 38-year-old has previously competed in all three Grands Tours.
The 95th edition of the Giro begins on Saturday with an 8.7-kilometre time trial through the streets of Herning, Denmark.