Two FSB officers were accused of conspiring with two alleged criminal hackers in a Department of Justice indictment announced on Wednesday.
The charges are believed to be the first that the US has filed against Russian government officials.
Yahoo's 2014 breach affected 500 million user accounts.
"As we have said repeatedly, there can be absolutely no question of any official involvement by any Russian agency, including the FSB [intelligence agency], in any illegal actions in cyberspace," said spokesman Dmitry Peskov.
US officials have alleged that two FSB officers, Dmitry Dokuchaev and Igor Sushchin, colluded with Karim Baratov and Alexsey Belan, who has been on the FBI's most wanted list for more than three years.
Besides orchestrating the breach, the indictment alleged that Yahoo accounts accessed without authorisation were used to launch a spam campaign