The pact comes after Malaysia uncovered an attempt by extremists led by a Syrian scholar with suspected ties to al Qaeda who were planning to blow up houses of worship last year and amid a surge in drug traffickers from Iran.
Prime Minister Najib Razak said his government would tighten security to prevent a resurgence of JI, which is blamed for a string of major attacks in the region including the 2002 Bali bombings in neighbouring Indonesia.
Hishammuddin Hussein, Malaysia interior ministry said the partnership will enable Kuala Lumpur and Riyadh to fight international terrorism, drugs smuggling forgery, counterfeiting, arms smuggling and money laundering.
"It will result in more frequent contact between senior officers from the Kingdom and Malaysia and it will be a platform to evaluate the programs agreed by both parties," he was quoted as saying by the Star newspaper.
"I'm hopeful that the agreement will enable us to enhance security not only in Malaysia but across Asia," he added.
Malaysian police on Monday said they had seized six grenades from a hotel in the capital last week and were investigating possible links to terror groups.