Police chased and arrested the suspect after wounding him in a shootout when he fled from his car, a ministry statement said on Friday.
The incident was being investigated. It was not immediately clear whether it was politically motivated, security sources said.
In December 2004, al-Qaeda fighters stormed the US consulate compound in the Red Sea port city, killing five non-American consular staff. Four of the five attackers died in the attack and a fifth was wounded and arrested.
Saudi Arabia, a key Western ally, has been battling a wave of al-Qaeda violence since May 2003 when suicide bombers struck at three residential compounds in the capital Riyadh.
Saudi-born Osama bin Laden's al-Qaeda has been fighting to topple the Saud monarchy and expel Westerners from the kingdom, the birthplace of Islam.
Last month, Saudi Arabia said it had arrested five insurgents linked to a failed al-Qaeda attack on a major oil facility in February, and seized 1.5 tonnes of explosives.
Officials say about 150 foreigners and Saudis, including security forces, and 120 insurgents have died in attacks and clashes with police in the past three years.