"He performed umrah twice," a ministry spokesman said of Omar Mateen, 29, who was of Afghan descent.
Mateen performed the minor umrah pilgrimage for 10 days in March 2011 and again for eight days in March 2012, the ministry spokesman told AFP.
He gave no further details.
CNN, citing an unnamed US official, said Mateen had also visited the United Arab Emirates.
The Islamic State group, which has also claimed attacks within Saudi Arabia, said Mateen was acting as one of its "soldiers" in Sunday's rampage.
It was the worst mass shooting in modern US history.
Signup to our newsletter and follow us on Facebook and Twitter!
Mateen died in a gun battle with police.
FBI chief James Comey said he was confident the gunman had been "radicalised" while consuming online propaganda, and there was no indication of a plot directed from outside the United States.
Saudi Arabia is the birthplace of Islam and home to its holiest sites.
The annual hajj and the umrah pilgrimage, which can be performed at any time, bring millions of Muslims to the kingdom every year.
Hillary Clinton, the presumptive Democratic party nominee for US president, on Monday accused Saudi Arabia and its neighbours of allowing extremism to thrive.
"It is long past time for the Saudis, the Qataris, and the Kuwaitis and others to stop their citizens from funding extremist organisations," Clinton said in a speech.
"And they should stop supporting radical schools and mosques around the world that have set too many young people on a path toward extremism."
Saudi Arabia has repeatedly denounced bombings and shootings carried out in various countries by the Islamic State group and other extremists.