Disclosed herein are methods of preventing and treating GVHD and autoimmune diseases. The methods entail administering one or more doses of an effective amount of a therapeutic agent to a subject to in vivo knock down Stat3 in the T cells and/or B cells of the subject. Alternatively, the methods entail contacting donor T cells and/or B cells with an effective amount of a therapeutic agent to in vitro knock down Stat3 and administering the Stat3-deficient T cells and/or B cells to the subject. Some examples of the therapeutic agent include small molecule Stat3 inhibitors such as Stat3 siRNAs delivered by an antibody to specifically knock down Stat3 in the lymphocytes of the target tissue.