Almost 9,000 cases have been reported so far in Switzerland, with 86 people having died from the virus.
In a statement on Twitter, 20-time Grand Slam singles champion Federer said: "These are challenging times for everyone and nobody should be left behind.
"[Wife] Mirka and I have personally decided to donate one million Swiss Francs for the most vulnerable families in Switzerland.
"Our contribution is just a start. We hope that others might join in supporting more families in need. Together we can overcome this crisis! Stay healthy!."
Earlier this month, the ATP and WTA jointly announced that all professional tennis had been suspended until June because of the outbreak.
The French Open is the only major initially scheduled to take place before then and has been moved to October, but fears are growing that Wimbledon, set for late June and early July, will have to be postponed, too.