Whelan, a former U.S. marine who also holds British, Canadian and Irish passports, was detained by Russia's Federal Security Service on Dec. 28.
His family say he is innocent and that he was in Moscow to attend a wedding. Whelan faces up to 20 years in jail if found guilty of espionage.
"He was caught red-handed," Foreign Minister Sergei Lavrov said on Wednesday during a news conference.
"He was detained at the moment he was carrying out specific illegal actions in his hotel."
Russian online news portal Rosbalt.ru earlier this month cited an unnamed Russian intelligence source as saying that Whelan had been detained five minutes after receiving a thumb drive containing a list of all the employees of a secret Russian state agency.
The same source was quoted as saying that Whelan had been spying for 10 years using the internet to identify targets from whom he could obtain information and that the employee list he was caught with had long been of interest to U.S. spies.
Lavrov said the investigation into Whelan continued and his detention was not motivated by any desire to try to exchange him for Russian citizens held in the United States.
He said Russia would allow U.S. diplomats to visit Whelan for a second time and that an Irish diplomat was also due to meet him soon. (Reporting by Vladimir Soldatkin, Christian Lowe and Maria Tsvetkova; writing by Tom Balmforth and Andrew Osborn; Editing by Jon Boyle)