The FSB officers "protected, directed, facilitated and paid criminal hackers to collect information through computer intrusions in the US and elsewhere", the department said in a statement announcing the indictments.
It was the first time Washington had filed criminal charges against Russian agents over cyber-related offenses. Or officials, as it were.
Some of the accounts the hackers had access to include those belonging to Russian journalists, USA and Russian government officials, and employees of financial, transportation, and other companies, the DOJ said.
Four people, including two Russian spies, are being indicted in connection to the 2014 hack of Yahoo.
The 2 others are Alexsey Belan, one of the hackers most wanted by the Federal Bureau of Investigation, and Karim Baratov, who was arrested on Tuesday in Canada.
The announcement comes as federal authorities investigate Russian interference through hacking in the 2016 presidential election.
Peskov said Russian officials found out about the arrests from media sources and were not informed through official channels but the Kremlin was ready to help out United States authorities in the case.
Four people charged by USA officials for a Yahoo data breach include two Russian intelligence officers and two hackers they enlisted. He was arrested in Europe in June 2013, but escaped to Russian Federation before he could be extradited.
In September, Yahoo said that at least 500 million of its accounts were hacked in 2014 by what it believed was a state-sponsored actor, a theft that appeared to be the world's biggest known cyber breach by far.
The hackers used the information to obtain contents at Yahoo and other emails providers, including Google's Gmail, the Justice Department said. The fact that the indictment ties together the FSB and criminals is a new development, he said. Interestingly, Dokuchaev was already arrested in Russian Federation last December and charged with state treason for passing information to the Central Intelligence Agency. Belan is thought to have stolen the entire user database of the companies, including encrypted passwords, and then negotiated the sale of the information. Baratov was arrested in Canada on Tuesday. At the time it disclosed the 2014 data breach past year, Yahoo said it may have been hacked by a "state-sponsored actor".