The statement from the U.S. Africa Command says the airstrike Wednesday evening about 25 kilometers (15 miles) west of Mogadishu prevented the bomb from being used against residents of the capital.
Al-Shabab was blamed for the massive truck bombing in Mogadishu in October that killed 512 people.
The U.S. has carried out 35 drone strikes in Somalia this year against al-Shabab and a small but growing presence of Islamic State group-linked fighters.
The Trump administration early this year approved expanded military operations in the Horn of Africa nation.
The new U.S. statement says they assess that no civilians were killed in the strike.