Gupta was granted bail by Justice A J Desai on the condition that he deposits security money of Rs 1 crore in two instalments of Rs 50 lakh each in one month.
He was also asked to report to the police station every Monday and cooperate with the investigation.
The bail was granted after Gupta's lawyer told the court that police had wrapped up the investigation in the case and trial being conducted in a local court in Gandhinagar will take time to complete.
CID had booked Gupta and seven others for allegedly syphoning off around Rs 113 crore by presenting "forged" bills and "bogus" documents related to ground-filling work carried out near Bhat village for Metro project in 2012.
Also Read
Gupta is also a co-accused in another scam related to MEGA, in which the company's former manager Radhesh Bhatt was accused of syphoning off Rs 2.62 crore through forged invoices from 2012 to 2013. Gupta was made a co-accused after his involvement was determined by the police.
Gupta had quit IAS in 2003 to start his own business. He was appointed in MEGA by the Gujarat government after he quit IAS.