The present application relates to the field of pharmaceutical chemistry. The application specifically relates to a crystal form A and crystal form B of a pyrrolopyrimidine (formula I) for preparing a JAK inhibitor. The application further relates to a method for preparing the crystal form A and crystal form B, a crystalline composition comprising the crystal form A or crystal form B, a pharmaceutical composition comprising the crystal form A, crystal form B, or crystalline composition, and a pharmaceutical application of the pharmaceutical composition, the crystal form A, and the crystal form B. The crystal form A and crystal form B of the application has the advantages of high purity, high crystallinity, and good stability.本發明屬於醫藥化學領域。具體而言,本發明涉及作為JAK抑制劑的吡咯並嘧啶化合物(式I)的結晶A和結晶B,還涉及結晶A和結晶B的製備方法、包含結晶A或結晶B的結晶組合物、包含結晶A或結晶B或其結晶組合物的藥物組合物以及它們的醫藥用途。本發明的結晶A和結晶B具有純度高、結晶度高、穩定性好等優點。