Provided in the present invention are a pharmaceutical composition of a substituted diphenylaminopyrimidine compound and a use thereof, wherein the compound is the compound as shown in formula (I), or a pharmaceutically acceptable salt, prodrug, hydrate or solvate, crystal form, N-oxide and various diastereomers thereof. The compound of the present invention can be used for treating diseases that can be treated with the JAK2 kinase inhibitor.