The man, according to the ministry was arrested in the aftermath of a shootout with security forces in al-Bukhariya city.
The ministry did not say when the incident occurred but said the man who embraced the Islamic State group’s “ideology”, was also in possession of a machine gun, a pistol and multiple rounds of ammunition.
The man has been identified as Fawaz Abdulrahman Eid Al-Harbi. He has been sent to hospital for treatment as he suffered wounds in the gun shootout.
The incident took place as the kingdom is welcoming millions of Hajj pilgrims.
Saudi Arabia, the largest Sunni country, has not witnessed any large scale terrorist attack but was in the past rocked by attacks staged by extremist groups including al Qaeda and the Islamic State group (ISIS). Most attacks had targeted security forces.
Security forces had also repeatedly clashed with minority Shia militants.
Last month, a security officer as well as a Bangladeshi civilian died in an attack by unknown men in a car shot at a security check point, in central Saudi Arabia.
Four police officers were killed in April and four others wounded in an attack targeting a checkpoint in the southwestern province of Asir, AFP repots citing the ministry.