In the last few years many exoplanets in the habitable zone (HZ) of M-dwarfs have been discovered, but the X-ray/UV activity of cool stars is very different from that of our Sun. The high-energy radiation environment influences the habitability, plays a crucial role for abiogenesis, and impacts planetary atmospheres. LHS 1140b is a super-Earth-size planet orbiting in the HZ of LHS 1140, an M4.5 dwarf at ~15 parsecs. We present the results of a Swift X-ray/UV observing campaign. We characterize for the first time the X-ray/UV radiation environment of LHS 1140b. We measure the variability of the near ultraviolet (NUV) flux and estimate the far ultraviolet (FUV) flux with a correlation between FUV and NUV flux of a sample of low-mass stars in the GALEX archive. We highlight the presence of a dominating X-ray source close to the J2000 coordinates of LHS 1140, characterize its spectrum, and derive an X-ray flux upper limit for LHS 1140. We find that this contaminant source could have influenced the previously estimated spectral energy distribution. No significant variation of the NUV flux of LHS 1140 is found over 3 months, and we do not observe any flare during the 38 ks on the target. LHS 1140 is in the 25th percentile of least variable M4-M5 dwarfs of the GALEX sample. Analyzing the UV flux experienced by the HZ planet LHS 1140b, we find that outside the atmosphere it receives a NUV flux <2% with respect to that of the present-day Earth, while the FUV/NUV ratio is ~100-200 times higher. This represents a lower limit to the true FUV/NUV ratio since the GALEX FUV band does not include Lyman-alpha, which dominates the FUV output of low-mass stars. This is a warning for future searches for biomarkers, which must take into account this high ratio. The relatively low level and stability of UV flux experienced by LHS 1140b should be favorable for its present-day habitability.