FSB members Igor Sushchin and Dmitry Dokuchaev have been charged with hacking, economic espionage, trade secret theft, wire fraud, and identity theft.
It is the first time the US has charged active Russian officials with cyber crimes.
The men are accused of working with hackers Alexsey Belan and Karim Baratov, who are not Russian government employees.
Belan has been described by Acting Assistant Attorney General Mary McCord as a "notorious" hacker, who is on the FBI's Most Wanted List.
He has previously been accused of hacking US tech and e-commerce companies.
In 2013 he was arrested in Europe but is believed to have escaped to Russia before he could be extradited to the US.
He is allegedly living under the protection of the Russia, who the US does not have an extradition treaty with.
Baratov is a Canadian citizen and was arrested in Toronto on Tuesday.
The FSB allegedly hired the men to target US and Russian government officials, diplomats, military, Russian journalists, financial sector employees and activists.
As part of the deal the FSB allegedly allowed the men to use the hacked accounts for whatever they wished, including scouring the data for credit card information and spamming.
However, with three of the suspects believed to be in Russia the chances of the men ever reaching the US to face the charges appear slim. Something the Justice Department is aware of.
"With these charges, the Department of Justice is continuing to send the powerful message that we will not allow individuals, groups, nation states or a combination of them to compromise the privacy of our citizens, the economic interests of our companies, or the security of our country," Ms McCord said in a statement.
Yahoo said in a statement that it was "deeply grateful" to the FBI for investigating the hack and to the Department of Justice for laying the charges.
Meanwhile an FBI investigation into a 2013 cyber attack on Yahoo that resulted in one billion users accounts being compromised remains ongoing.
Russian intelligence agents have previously been accused of interfering in last year's US presidential election by hacking the Democratic national Committee.
Washington responded by imposing further sanctions on Russia, who allegedly intervened in the election in a bid to help then Republican nominee Donald Trump.
The latest charges present another new challenge for the new president, who has spoken of his desire to improve relations with Russia.