The Mercenary team rigged a bomb with 500 pounds of C-4 explosive before making their last trip to the Island. The bomb was connected to a dead man's trigger attached to Martin Keamy, the leader of the mercenaries.
Michael fixed the engines a short time after the mercenaries left the Kahana. Desmond then rushed to inform Hendricks that the engines were functional and Hendricks began to pilot the freighter towards the Island. Something on the ship is emitting RF interference that is preventing the fathometer from working, so Hendricks informs Desmond that he will not bring the freighter closer than 5 miles from the Island. ("There's No Place Like Home, Part 1") Desmond, Michael, and Jin then searched the ship for the source of the interference. They discovered the bomb in the armory of the Kahana. ("There's No Place Like Home, Part 2")
Attempts to Disarm
Desmond, Michael, and Jin immediately determine that they need to attempt to disarm the bomb. Desmond tells the others that he had 6 months of explosives training while in the army, and that the bomb has a number of failsafe systems. The bomb will detonate itself if any number of attempts are made to disarm it, such as cut dummy wires, disable one of its firing systems, or disconnect its power source. ("There's No Place Like Home, Part 2")
Michael then got the idea to freeze the power source, a battery, using liquid nitrogen from the refrigeration hold. In the meantime, Desmond and Jin tried to trace the wiring of the bomb. ("There's No Place Like Home, Part 2")
The bomb was detonated when Ben attacked and ultimately killed Keamy in The Orchid station. Keamy's dead man's trigger sent a signal to the bomb, but Michael's attempts to freeze the battery gave everyone on the freighter a window of about 5 minutes before detonation. That window allowed the helicopter to re-fuel and take off before the explosion. ("There's No Place Like Home, Part 2")