According to the ministry, cited by Al Arabiya, the authorities prevented the attack in March.
The attack is said to have been planned by a group of 93 people, suspected of having links to the Islamic State (ISIL) extremist group. Saudi authorities have detained the suspects.
The ministry said the authorities had foiled a number of ISIL attempts to murder Saudi servicemen.
The ISIL primarily operates in Syria and Iraq but recently the militants have been making attempts to branch out into other countries, including Afghanistan and Pakistan, as well as Libya.
Saudi Arabia forms part of the US-led military effort against Islamic State. The US-led coalition has been conducting airstrikes on ISIL positions in Iraq and Syria.