Former top defense ministry official Gotabhaya and six others had been asked to appear in Colombo magistrate court under the corruption charges filed by the Bribery Commission.
They were accused of causing a loss of 11.4 billion rupees to the state exchequer by supporting a private firm to run the floating armory in the southern sea port of Galle.
Gotabhaya, 67, had publicly denied any wrongdoing.
Gotabhaya became another member of the Rajapaksa family to get bail as several other family members of the the former President were subject to investigations over corruption.
More From This Section
Mahinda's eldest son Namal was arrested for alleged money-laundering and is currently on bail.
His younger brother Yoshitha is on bail after having faced money-laundering charges and his other brother Basil, former economic development minister, is also on bail.
The Rajapaksa family has described legal action as a "political witch-hunt" launched by the current government headed by Rajapaksa's successor Maithripala Sirisena.