We study the heating of the intergalactic medium ( IGM ) surrounding high redshift star forming galaxies due to cosmic rays ( CR ) . We take into account the diffusion of low energy cosmic rays and study the patchiness of the resulting heating . We discuss the case of IGM heating around a high redshift minihalo ( z \sim 10 \hbox { - - } 20 , M \sim 10 ^ { 5 } \hbox { - - } 10 ^ { 7 } M _ { \odot } ) , and put an upper limit on the diffusion coefficient D \leq 1 \times 10 ^ { 26 } cm ^ { 2 } s ^ { -1 } for the heating to be inhomogeneous at z \sim 10 and D \leq 5 \hbox { - - } 6 \times 10 ^ { 26 } cm ^ { 2 } s ^ { -1 } at z \sim 20 . For typical values of D , our results suggest uniform heating by CR at high redshift , although there are uncertainties in magnetic field and other CR parameters . We also discuss two cases with continuous star formation , one in which the star formation rate ( SFR ) of a galaxy is high enough to make the IGM in the vicinity photoionized , and another in which the SFR is low enough to keep it neutral but high enough to cause significant heating by cosmic ray protons . In the neutral case ( low SFR ) , we find that the resulting heating can make the gas hotter than the cosmic microwave background ( CMB ) radiation for D < 10 ^ { 30 } cm ^ { 2 } s ^ { -1 } , within a few kpc of the galaxy , and unlikely to be probed by near future radio observations . In the case of photoionized IGM ( high SFR ) , the resulting heating of the gas in the vicinity of high redshift ( z \sim 4 ) galaxies of mass \geq 10 ^ { 12 } M _ { \odot } can suppress gas infall into the galaxy . At lower redshifts ( z \sim 0 ) , an SFR of \sim 1 M _ { \odot } yr ^ { -1 } can suppress the infall into galaxies of mass \leq 10 ^ { 10 } M _ { \odot } .