"We are against the plea for the cancellation of the bail and the petition is dismissed," a bench comprising justices Aftab Alam and Ranjana Prakash Desai said.
"We, however, allow the transfer petition and agree to transfer the case to Mumbai," the bench said.
The court also permitted Shah to enter and travel in Gujarat in view of the upcoming assembly elections.
The CBI had approached the apex court against the bail granted to Shah by the Gujarat high court in the case of fake encounter killing of gangster Sohrabuddin Sheikh and for shifting the trial of the case to a place outside Gujarat.
Sheikh and his wife Kauser Bi were allegedly abducted by Gujarat's Anti-Terrorism Squad from Hyderabad and killed in a fake encounter near Gandhinagar in November 2005.
Shah, a close aide of Chief Minister Narendra Modi, was arrested by the CBI on July 25, 2010 and had spent over three months in Sabarmati Jail in Ahmedabad.
Shah had to quit the Modi government in July last year after having been slapped with charges of kidnapping and murder in connection with the case. The CBI has alleged that he was the "kingpin" of the conspiracy in the case.
The agency had earlier urged the apex court to transfer the trial outside Gujarat arguing that witnesses were being intimidated and the trial could not be held in a free and fair manner.
Image: Former Gujarat minister Amit Shah