FBI agents and Europol — the European Union's law enforcement agency — arrested 80 people in raids.
The operation targeted the alleged use of Blackshades software, which can remotely control people's computers and webcams.
A Police Scotland spokesman said: "A 20-year-old man from St Andrews and a 22-year-old man from Glasgow have been charged with offences under the Computer Misuse Act. Reports on both men have been submitted to the Procurator Fiscal."
The men are expected to appear at court a later date.
Around 300 searches were carried out worldwide.
More than 1,000 data storage devices were seized, including computers, laptops, mobile phones, external hard drives and USB memory sticks.
The UK's National Crime Agency confirmed 15 people were arrested in England.
Other people were arrested in countries including America, France, Germany, Netherlands, Belgium, Finland, Austria, Estonia, Denmark, Canada, Chile, Croatia and Italy.