The present invention relates to compositions and methods for treating viral diseases. Disclosed for the first time, a new use of P2X receptor antagonists for the preparation of a composition for treating viral infections. The P2X receptor antagonists achieve preventive or therapeutic effect on hand foot and mouth disease by inhibiting viruses.